Anthony Sottile <asott...@umich.edu> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35843>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to