File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11
11
try :
12
12
from importlib .resources import read_text
13
13
except ImportError :
14
- # This fallback will work for Python versions prior to 3.7 that lack the
15
- # importlib.resources module but relies on the existing `where` function
16
- # so won't address issues with environments like PyOxidizer that don't set
17
- # __file__ on modules.
18
- def read_text (_module , _path , encoding = "ascii" ):
19
- with open (where (), "r" , encoding = encoding ) as data :
20
- return data .read ()
14
+ # Use the backport of importlib.resources for versions of Python that
15
+ # don't have importlib.resources
16
+ from importlib_resources import read_text
21
17
22
18
23
19
def where ():
Original file line number Diff line number Diff line change 57
57
'Documentation' : 'https://certifiio.readthedocs.io/en/latest/' ,
58
58
'Source' : 'https://github.com/certifi/python-certifi' ,
59
59
},
60
+ extras_require = {":python_version < '3.7'" : ["importlib-resources" ],},
60
61
)
You can’t perform that action at this time.
0 commit comments