Message334485
Hmmm, it appears this was changed in python3.7 to have `None` for the origin instead of `'namespace'` -- however the `submodule_search_locations` is still not indexable:
>>> importlib.util.find_spec('a')
ModuleSpec(name='a', loader=None, submodule_search_locations=_NamespacePath(['/tmp/x/a']))
>>> importlib.util.find_spec('a').origin
>>> spec = importlib.util.find_spec('a')
>>> spec.submodule_search_locations
_NamespacePath(['/tmp/x/a'])
>>> spec.submodule_search_locations[0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '_NamespacePath' object does not support indexing |
|
Date |
User |
Action |
Args |
2019-01-28 18:07:28 | Anthony Sottile | set | recipients:
+ Anthony Sottile, docs@python |
2019-01-28 18:07:26 | Anthony Sottile | set | messageid: <1548698846.5.0.764327842913.issue35843@roundup.psfhosted.org> |
2019-01-28 18:07:26 | Anthony Sottile | link | issue35843 messages |
2019-01-28 18:07:26 | Anthony Sottile | create | |
|