[issue35791] Unexpected exception with importlib

2019-01-27 Thread Nick Coghlan
Nick Coghlan added the comment: #35839 is follow-up enhancement request, proposing that we tweak the sys.modules handling in find_spec to ignore cache entries that don't have a __spec__ attribute set. -- ___ Python tracker

[issue35791] Unexpected exception with importlib

2019-01-22 Thread Eric Snow
Eric Snow added the comment: FYI, I opened #35806 for typing.io. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue35791] Unexpected exception with importlib

2019-01-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: I expected as much. I've filed an issue with apipkg for this: https://github.com/pytest-dev/apipkg/issues/13. My next challenge is to find a way to work around this issue in my code. BTW. Typing.io is a namespace added to sys.modules by the typing module

[issue35791] Unexpected exception with importlib

2019-01-22 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, that's a bug in `py`'s module interface emulation - see the last paragraph in https://docs.python.org/3/reference/import.html#module-spec -- resolution: -> not a bug stage: -> resolved status: open -> closed _

[issue35791] Unexpected exception with importlib

2019-01-20 Thread Ronald Oussoren
Ronald Oussoren added the comment: This might be a bug in "py", which uses a vendored version of apipkg that replaces sys.modules["py"] with a lazy loading object. That copy of apipkg does not copy __spec__ into the lazy loading object. If this is indeed consider to be a bug in py I'll file

[issue35791] Unexpected exception with importlib

2019-01-20 Thread Ronald Oussoren
New submission from Ronald Oussoren : Using Python 3.7.2 on macOS 10.14 I get an unexpected exception when calling "importlib.util.find_spec('py')" after importing "py". find_spec works as expected before I import 'py'. See the repl session below: Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 201