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.

classification
Title: modulefinder misses modules
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: theller Nosy List: theller
Priority: normal Keywords: patch

Created on 2005-08-05 12:32 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test.zip theller, 2005-08-05 12:32 Sample script and package
modulefinder.patch theller, 2005-08-05 12:34 Patch for modulefinder
Messages (2)
msg48645 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2005-08-05 12:32
Failing top-level imports hide modules with the same
name in packages.

The attached zipfile contains a script main.py and a
simple contrived package demonstrating the problem.

If the zip-archive is unpacked to some directory, and
modulefinder is run in this directory, it prints this:

c:\sf\test>py24 -m modulefinder main.py

  Name                      File
  ----                      ----
m __main__                  main.py
P a                         a\__init__.py
P a.c                       a\c\__init__.py

Missing modules:
? spam imported from __main__, a

c:\sf\test>

With the attached patch, the output is like this:

c:\sf\test>py24 -m modulefinder main.py

  Name                      File
  ----                      ----
m __main__                  main.py
P a                         a\__init__.py
P a.c                       a\c\__init__.py
m a.c.spam                  a\c\spam.py
m a.spam                    a\spam.py

Missing modules:
? spam imported from __main__

c:\sf\test>
msg48646 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2005-08-05 12:34
Logged In: YES 
user_id=11105

Patch attached.
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42256
2008-01-16 20:54:24thellersetstatus: open -> closed
resolution: out of date
2005-08-05 12:32:26thellercreate