Issue20020
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.
Created on 2013-12-19 04:05 by eric.snow, last changed 2022-04-11 14:57 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 11787 | merged | brandtbucher, 2019-02-08 03:24 | |
| PR 11787 | merged | brandtbucher, 2019-02-08 03:24 | |
| Messages (3) | |||
|---|---|---|---|
| msg206576 - (view) | Author: Eric Snow (eric.snow) * ![]() |
Date: 2013-12-19 04:05 | |
The modulefinder module (Lib/modulefinder.py) provides a ModuleFinder class (plus 2 helpers) you can use to see what modules a script imports (directly or indirectly). The module's implementation is centered on the old imp.find_/load_module() API (which has been deprecated). The implementation should be refactored to reflect/make use of the newer import-related APIs. The documented API for ModuleFinder is very small. However, it has quite a few methods that are "public" in the sense that their names do not start with an underscore. This will make any kind of refactoring trickier. |
|||
| msg206608 - (view) | Author: Thomas Heller (theller) * ![]() |
Date: 2013-12-19 12:20 | |
I have written a new modulefinder based on importlib. It is not a refactoring of the old one, so it is no plug-in replacement. Instead it has some new features: - Better logging output - collects dependencies (self._depgraph maps module names to callers) - when run as script, the command line syntax are easier to understand (although parsing is still done by getopt; argparse would be event better) - The Module proxies that modulefinder collects give better access to the module's attributes, including the byte code It is not yet tested in the wild but I will use it for the Python3 py2exe implementation. If anyone wants to take a look the current version is here: http://code.google.com/p/ctypes-stuff/source/browse/trunk/mf/py2exe/mf3.py |
|||
| msg229310 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2014-10-14 16:35 | |
The code of Thomas has not the same API than the "modulefinder" module. If you want a patch, we need to rework the code of Thomas and provide an equivalent API with the existing one. What do you suggest? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:55 | admin | set | github: 64219 |
| 2019-02-08 03:24:33 | brandtbucher | set | keywords:
+ patch stage: needs patch -> patch review pull_requests: + pull_request11789 |
| 2019-02-08 03:24:25 | brandtbucher | set | keywords:
+ patch stage: needs patch -> needs patch pull_requests: + pull_request11788 |
| 2015-10-04 02:14:25 | Arfrever | set | nosy:
+ Arfrever |
| 2014-10-14 17:36:21 | berker.peksag | set | nosy:
+ berker.peksag |
| 2014-10-14 16:35:47 | matrixise | set | nosy:
+ matrixise messages: + msg229310 |
| 2014-09-01 10:29:35 | berker.peksag | set | stage: needs patch |
| 2013-12-19 12:20:25 | theller | set | nosy:
+ theller messages: + msg206608 |
| 2013-12-19 04:05:25 | eric.snow | create | |
