4 Summary: Python module dependency analysis tool
5 Home-page: http://bitbucket.org/ronaldoussoren/modulegraph
6 Author: Ronald Oussoren
7 Author-email: ronaldoussoren@mac.com
9 Download-URL: http://pypi.python.org/pypi/modulegraph
10 Description: modulegraph determines a dependency graph between Python modules primarily
11 by bytecode analysis for import statements.
13 modulegraph uses similar methods to modulefinder from the standard library,
14 but uses a more flexible internal representation, has more extensive
15 knowledge of special cases, and is extensible.
24 * Issue #25: Complex python files could cause an "maximum recursion depth exceeded"
25 exception due to using stack-based recursion to walk the module AST.
31 * Added 'modulegraph.modulegraph.InvalidSourceModule'. This graph node is
32 used for Python source modules that cannot be compiled (for example because
33 they contain syntax errors).
35 This is primarily useful for being able to create a graph for packages
36 that have python 2.x or python 3.x compatibility in separate modules that
37 contain code that isn't valid in the "other" python version.
39 * Added 'modulegraph.modulegraph.InvalidCompiledModule'. This graph node
40 is used for Python bytecode modules that cannot be loaded.
42 * Added 'modulegraph.modulegraph.NamespacePackage'.
44 Patch by bitbucket user htgoebel.
46 * No longer add a MissingModule node to the graph for 'collections.defaultdict'
47 when using 'from collections import defaultdict' ('collections.defaultdict'
48 is an attribute of 'collections', not a submodule).
50 * Fixed typo in ModuleGraph.getReferences()
52 * Added ModuleGraph.getReferers(tonode). This methods yields the
53 nodes that are referencing *tonode* (the reverse of getReferences)
55 * The graph will no longer contain MissingModule nodes when using 'from ... import name' to
56 import a global variable in a python module.
58 There will still be MissingModule nodes for global variables in C extentions, and
59 for 'from missing import name' when 'missing' is itself a MissingModule.
61 * Issue #18: Don't assume that a PEP 302 loader object has a ``path`` attribute. That
62 attribute is not documented and is not always present.
72 * Issue #145: Don't exclude the platform specific 'path' modules (like ntpath)
77 This is a feature release
82 * Hardcode knowlegde about the compatibility aliases in the email
83 module (for python 2.5 upto 3.0).
85 This makes it possible to remove a heavy-handed recipe from py2app.
87 * Added ``modegraph.zipio.getmode`` to fetch the Unix file mode
90 * Added some handy methods to ``modulegraph.modulegraph.ModuleGraph``.
95 This is a bugfix release
97 * Don't look at the file extension to determine the file type
98 in modulegraph.find_modules.parse_mf_results, but use the
101 * Issue #13: Improved handing of bad relative imports
102 ("from .foo import bar"), these tended to raise confusing errors and
103 are now handled like any other failed import.
108 This is a bugfix release
110 * There were no 'classifiers' in the package metadata due to a bug
116 This is a bugfix release
121 * ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
122 a py2app module didn't have a file name ending in '.py'.
127 This is a bugfix release
132 * Issue #12: modulegraph would sometimes find the wrong package *__init__*
133 module due to using the wrong search method. One easy way to reproduce the
134 problem was to have a toplevel module named *__init__*.
141 This is a bugfix release
146 * Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref
147 and --graph options of py2app) didn't work with python 3 due to use of
148 APIs that aren't available in that version of python.
150 Reported by Andrew Barnert.
156 This is a minor feature release
161 * ``modulegraph.find_modules.find_needed_modules`` claimed to automaticly
162 include subpackages for the "packages" argument as well, but that code
165 * Issue #9: The modulegraph script is deprecated, use
166 "python -mmodulegraph" instead.
168 * Issue #10: Ensure that the result of "zipio.open" can be used
169 in a with statement (that is, ``with zipio.open(...) as fp``.
171 * No longer use "2to3" to support Python 3.
173 Because of this modulegraph now supports Python 2.6
176 * Slightly improved HTML output, which makes it easier
177 to manipulate the generated HTML using JavaScript.
179 Patch by anatoly techtonik.
181 * Ensure modulegraph works with changes introduced after
184 * Implement support for PEP 420 ("Implicit namespace packages")
187 * ``modulegraph.util.imp_walk`` is deprecated and will be
188 removed in the next release of this package.
193 * The module graph was incomplete, and generated incorrect warnings
194 along the way, when a subpackage contained import statements for
197 An example of this is ``sqlalchemy.util``, the ``__init__.py`` file
198 for this package contains imports of modules in that modules using
199 the classic relative import syntax (that is ``import compat`` to
200 import ``sqlalchemy.util.compat``). Until this release modulegraph
201 searched the wrong path to locate these modules (and hence failed
208 This is a bugfix release
213 * The 'packages' option to modulegraph.find_modules.find_modules ignored
214 the search path argument but always used the default search path.
216 * The 'imp_find_modules' function in modulegraph.util has an argument 'path',
217 this was a string in previous release and can now also be a sequence.
219 * Don't crash when a module on the 'includes' list doesn't exist, but warn
220 just like for missing 'packages' (modulegraph.find_modules.find_modules)
225 This is a bugfix release
230 - Fixed the name of nodes imports in packages where the first element of
231 a dotted name can be found but the rest cannot. This used to create
232 a MissingModule node for the dotted name in the global namespace instead
233 of relative to the package.
235 That is, given a package "pkg" with submodule "sub" if the "__init__.py"
236 of "pkg" contains "import sub.nomod" we now create a MissingModule node
237 for "pkg.sub.nomod" instead of "sub.nomod".
239 This fixes an issue with including the crcmod package in application
240 bundles, first reported on the pythonmac-sig mailinglist by
246 This is a minor feature release
251 - Documentation is now generated using `sphinx <http://pypi.python.org/pypi/sphinx>`_
252 and can be viewed at <http://packages.python.org/modulegraph>.
254 The documention is very rough at this moment and in need of reorganisation and
255 language cleanup. I've basiclly writting the current version by reading the code
256 and documenting what it does, the order in which classes and methods are document
257 is therefore not necessarily the most useful.
259 - The repository has moved to bitbucket
261 - Renamed ``modulegraph.modulegraph.AddPackagePath`` to ``addPackagePath``,
262 likewise ``ReplacePackage`` is now ``replacePackage``. The old name is still
263 available, but is deprecated and will be removed before the 1.0 release.
265 - ``modulegraph.modulegraph`` contains two node types that are unused and
266 have unclear semantics: ``FlatPackage`` and ``ArchiveModule``. These node
267 types are deprecated and will be removed before 1.0 is released.
269 - Added a simple commandline tool (``modulegraph``) that will print information
270 about the dependency graph of a script.
272 - Added a module (``zipio``) for dealing with paths that may refer to entries
273 inside zipfiles (such as source paths referring to modules in zipped eggfiles).
275 With this addition ``modulegraph.modulegraph.os_listdir`` is deprecated and
276 it will be removed before the 1.0 release.
280 - The ``__cmp__`` method of a Node no longer causes an exception
281 when the compared-to object is not a Node. Patch by Ivan Kozik.
283 - Issue #1: The initialiser for ``modulegraph.ModuleGraph`` caused an exception
284 when an entry on the path (``sys.path``) doesn't actually exist.
286 Fix by "skurylo", testcase by Ronald.
288 - The code no longer worked with python 2.5, this release fixes that.
290 - Due to the switch to mercurial setuptools will no longer include
291 all required files. Fixed by adding a MANIFEST.in file
293 - The method for printing a ``.dot`` representation of a ``ModuleGraph``
300 This is a minor feature release
304 - ``from __future__ import absolute_import`` is now supported
306 - Relative imports (``from . import module``) are now supported
308 - Add support for namespace packages when those are installed
309 using option ``--single-version-externally-managed`` (part
310 of setuptools/distribute)
315 This is a minor feature release
319 - Initial support for Python 3.x
321 - It is now possible to run the test suite
322 using ``python setup.py test``.
324 (The actual test suite is still fairly minimal though)
326 Keywords: import,,dependencies
328 Classifier: Intended Audience :: Developers
329 Classifier: License :: OSI Approved :: MIT License
330 Classifier: Programming Language :: Python
331 Classifier: Programming Language :: Python :: 2
332 Classifier: Programming Language :: Python :: 2.7
333 Classifier: Programming Language :: Python :: 3
334 Classifier: Programming Language :: Python :: 3.3
335 Classifier: Programming Language :: Python :: 3.4
336 Classifier: Topic :: Software Development :: Libraries :: Python Modules
337 Classifier: Topic :: Software Development :: Build Tools