File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
11
# ANY KIND, either express or implied. See the License for the specific
12
12
# language governing permissions and limitations under the License.
13
+ import importlib .resources
13
14
import os
14
15
15
16
from botocore .docs .bcdoc .restdoc import DocumentStructure
24
25
25
26
class ServiceDocumenter (BaseServiceDocumenter ):
26
27
# The path used to find examples
27
- EXAMPLE_PATH = os . path . join ( os . path . dirname ( boto3 . __file__ ), 'examples' )
28
+ EXAMPLE_PATH = str ( importlib . resources . files ( ' boto3' ) / 'examples' )
28
29
29
30
def __init__ (self , service_name , session , root_docs_path ):
30
31
super ().__init__ (
Original file line number Diff line number Diff line change 12
12
# language governing permissions and limitations under the License.
13
13
14
14
import copy
15
- import os
15
+ import importlib . resources
16
16
17
17
import botocore .session
18
18
from botocore .client import Config
@@ -147,9 +147,8 @@ def _setup_loader(self):
147
147
Setup loader paths so that we can load resources.
148
148
"""
149
149
self ._loader = self ._session .get_component ('data_loader' )
150
- self ._loader .search_paths .append (
151
- os .path .join (os .path .dirname (__file__ ), 'data' )
152
- )
150
+ data_path = str (importlib .resources .files ('boto3' ) / 'data' )
151
+ self ._loader .search_paths .append (data_path )
153
152
154
153
def get_available_services (self ):
155
154
"""
You can’t perform that action at this time.
0 commit comments