[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2021-10-23 Thread Filipe Laíns
Filipe Laíns added the comment: I opened up a new PR that should fix this properly. The root issue was that PathFinder was not setting the loader attribute for namespace packages in the spec, which it should. After fixing that, _find_module just needed to be updated to deal with NamespaceLoad

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2021-10-23 Thread Filipe Laíns
Change by Filipe Laíns : -- pull_requests: +27465 pull_request: https://github.com/python/cpython/pull/29196 ___ Python tracker ___ _

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2021-05-29 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-10-31 Thread Denis Kasak
Denis Kasak added the comment: Anything still left to do that is stalling this? I just got bitten by it when trying to use modulefinder. -- nosy: +dkasak ___ Python tracker _

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-05 Thread Cajetan Rodrigues
Cajetan Rodrigues added the comment: Turns out using _PKG_DIRECTORY as a type for namespace packages ended up making `_find_module` try to search for an __init__.py within them, since it had no understanding of the diff. between a namespace package and a regular one (the lack of __init__.py)

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-05 Thread Cajetan Rodrigues
Change by Cajetan Rodrigues : -- keywords: +patch pull_requests: +19231 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/19917 ___ Python tracker ___

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-04 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-02 Thread Cajetan Rodrigues
Cajetan Rodrigues added the comment: Reproduced on Python3.9.0a5+ imp.find_module() simply raised an ImportError in my tests with an implicitly namespaced package (without an __init__.py) About the "type_", I think it should be consistent with _PKG_DIRECTORY, since PEP 420 states the follow

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-01 Thread Eric Snow
Eric Snow added the comment: Ah, namespace packages. :) Yeah, the code is not taking the "spec.loader is None" case into account. I expect the fix would be to add handling of that case a few lines up in the code, right after handling BuiltinImporter and FrozenImporter. Offhand I'm not sur

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-05-01 Thread Eric Snow
Change by Eric Snow : -- stage: -> test needed versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-04-21 Thread Greg Whiteley
New submission from Greg Whiteley : Issue: Running ModuleFinder.run_script() on numpy versions 1.16.1 to 1.18.3 (maybe more) fails with backtrace. See steps to reproduce below. I do not see this problem on earlier versions of python than 3.8 (tested 3.4, 3.5, 3.6 on ubuntu LTSs), but the co