[Patches] [ python-Patches-637835 ] Modulefinder doesn't handle PyXML
SourceForge.net
noreply@sourceforge.net
Wed, 05 Feb 2003 09:24:57 -0800
Patches item #637835, was opened at 2002-11-13 17:16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637835&group_id=5470
Category: Demos and tools
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Thomas Heller (theller)
Assigned to: Thomas Heller (theller)
Summary: Modulefinder doesn't handle PyXML
Initial Comment:
The attached patch adds a mechanism to handle cases
like PyXML, where a module injects itself into
sys.modules under a different name. With a special
version of py2exe I was able to freeze some of the
PyXML test scripts, although I didn't succeed with
freeze - the extension modules did not load.
----------------------------------------------------------------------
>Comment By: Thomas Heller (theller)
Date: 2003-02-05 18:24
Message:
Logged In: YES
user_id=11105
Has been checked in for quite some time.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-11-14 14:47
Message:
Logged In: YES
user_id=21627
The patch is fine (with the renaming), please apply it.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2002-11-14 09:50
Message:
Logged In: YES
user_id=11105
I call
ReplaceModule("_xmlplus", "xml")
and then run ModuleFinder on my script.
Only when the module named "_xmlplus" is loaded by
load_package, the replaceModule hook is triggered. With the
above call, it is then inserted into ModuleFinder's modules
instance var under the name "xml", and not "_xmlplus". This
mirrors what is done by _xmlplus/__init__.py file.
Now that I think over it, probably ReplaceModule should be
renamed to ReplacePackage ...
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-11-14 00:44
Message:
Logged In: YES
user_id=21627
How is this supposed to be used? Do you add to
replaceModuleMap only if the replacement module is present?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637835&group_id=5470