[Python-bugs-list] [ python-Bugs-787113 ] zipimport on meta_path
fails with mutual importers
SourceForge.net
noreply at sourceforge.net
Mon Aug 11 20:25:42 EDT 2003
Bugs item #787113, was opened at 2003-08-12 14:25
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=787113&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim McLennan (timmcl)
Assigned to: Nobody/Anonymous (nobody)
Summary: zipimport on meta_path fails with mutual importers
Initial Comment:
If I create a simple package consisting of a
package/__init__.py containing:
print "Package: "+__name__
import module
and a package/module.py containing:
print "Module: "+__name__
import package
and zip the directory resulting directory up, then it
imports fine if I add the zip to sys.path
However if Instead create a zipimporter object and add
it to the meta_path then I get a whole heap of
recursive imports resulting in output of the following
form:
Package: package
Module: package.module
Package: package.package
Module: package.package.module
Package: package.package.package
Module: package.package.package.module
Package: package.package.package.package
Module: package.package.package.package.module
Package: package.package.package.package.package
....
before finally running into an exception:
ValueError: Module name too long
For reference my version string is '2.3 (#46, Jul 29
2003, 18:54:32) [MSC v.1200 32 bit (Intel)]'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=787113&group_id=5470
More information about the Python-bugs-list
mailing list