[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support packages

2016-03-20 Thread Eric Snow
Eric Snow added the comment: Hmm. These two should be equivalent: if spec.loader.is_package(fullmodule): dict['__path__'] = [os.path.dirname(fname)] if spec.submodule_search_locations is not None: dict['__path__'] = spec.submodule_search_locations Do you mean that "python -m py

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support packages

2016-03-19 Thread STINNER Victor
STINNER Victor added the comment: >Hmm. These two should be equivalent: > if spec.loader.is_package(fullmodule): ... The problem is that spec.loader is None when test is a package. It's easy to reproduce the issue: $ rm -f Lib/test/__init__.py Lib/test/__pycache__/__init__.cpython-36.pyc $ ./p

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support packages

2016-03-15 Thread STINNER Victor
Changes by STINNER Victor : -- title: pyclbr.readmodule() and pyclbr.readmodule_ex() doens't support packages -> pyclbr.readmodule() and pyclbr.readmodule_ex() don't support packages ___ Python tracker ___