Skip to main content

Python module dependency analysis tool

Project description

modulegraph determines a dependency graph between Python modules primarily by bytecode analysis for import statements.

modulegraph uses similar methods to modulefinder from the standard library, but uses a more flexible internal representation, has more extensive knowledge of special cases, and is extensible.

Release history

0.9.1

This is a bugfix release

Bug fixes

  • Fixed the name of nodes imports in packages where the first element of a dotted name can be found but the rest cannot. This used to create a MissingModule node for the dotted name in the global namespace instead of relative to the package.

    That is, given a package “pkg” with submodule “sub” if the “__init__.py” of “pkg” contains “import sub.nomod” we now create a MissingModule node for “pkg.sub.nomod” instead of “sub.nomod”.

    This fixes an issue with including the crcmod package in application bundles, first reported on the pythonmac-sig mailinglist by Brendan Simon.

0.9

This is a minor feature release

Features:

  • Documentation is now generated using sphinx and can be viewed at <http://packages.python.org/modulegraph>.

    The documention is very rough at this moment and in need of reorganisation and language cleanup. I’ve basiclly writting the current version by reading the code and documenting what it does, the order in which classes and methods are document is therefore not necessarily the most useful.

  • The repository has moved to bitbucket

  • Renamed modulegraph.modulegraph.AddPackagePath to addPackagePath, likewise ReplacePackage is now replacePackage. The old name is still available, but is deprecated and will be removed before the 1.0 release.

  • modulegraph.modulegraph contains two node types that are unused and have unclear semantics: FlatPackage and ArchiveModule. These node types are deprecated and will be removed before 1.0 is released.

  • Added a simple commandline tool (modulegraph) that will print information about the dependency graph of a script.

  • Added a module (zipio) for dealing with paths that may refer to entries inside zipfiles (such as source paths referring to modules in zipped eggfiles).

    With this addition modulegraph.modulegraph.os_listdir is deprecated and it will be removed before the 1.0 release.

Bug fixes:

  • The __cmp__ method of a Node no longer causes an exception when the compared-to object is not a Node. Patch by Ivan Kozik.

  • Issue #1: The initialiser for modulegraph.ModuleGraph caused an exception when an entry on the path (sys.path) doesn’t actually exist.

    Fix by “skurylo”, testcase by Ronald.

  • The code no longer worked with python 2.5, this release fixes that.

  • Due to the switch to mercurial setuptools will no longer include all required files. Fixed by adding a MANIFEST.in file

  • The method for printing a .dot representation of a ModuleGraph works again.

0.8.1

This is a minor feature release

Features:

  • from __future__ import absolute_import is now supported
  • Relative imports (from . import module) are now supported
  • Add support for namespace packages when those are installed using option --single-version-externally-managed (part of setuptools/distribute)

0.8

This is a minor feature release

Features:

  • Initial support for Python 3.x

  • It is now possible to run the test suite using python setup.py test.

    (The actual test suite is still fairly minimal though)

Project details


Release history Release notifications

History Node

0.16

History Node

0.15

History Node

0.14

History Node

0.13

History Node

0.12.1

History Node

0.12

History Node

0.11.1

History Node

0.11

History Node

0.10.4

History Node

0.10.3

History Node

0.10.2

History Node

0.10.1

History Node

0.10

This version
History Node

0.9.1

History Node

0.9

History Node

0.8

History Node

0.7.3

History Node

0.7

History Node

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
modulegraph-0.9.1.tar.gz (442.9 kB) Copy SHA256 hash SHA256 Source None Jul 24, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page