This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile, docs@python
Date 2019-01-28.18:07:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548698846.5.0.764327842913.issue35843@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-01-28 18:07:28Anthony Sottilesetrecipients: + Anthony Sottile, docs@python
2019-01-28 18:07:26Anthony Sottilesetmessageid: <1548698846.5.0.764327842913.issue35843@roundup.psfhosted.org>
2019-01-28 18:07:26Anthony Sottilelinkissue35843 messages
2019-01-28 18:07:26Anthony Sottilecreate