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.

Author filitov
Recipients
Date 2004-09-16.20:35:39
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
This is based on bug 856103 "reload() fails with
modules from zips", but only a fix for the PEP 302
loaders not being used in reload.

There are other issues with reloading zip files,
specifically when the size of the zip changes, new
buffers are not created, but that is a separate issue
and dealt with in bug 856103 instead of here.

----

This patch just modifies import.c's
PyImport_ReloadModule to use a loader argument to
find_module and load_module.

A few things to note:

1) After my original 856103 patch was made, the path
parameter to find_module now has to be non null. This
path variable was only being set in the subname != NULL
case off of the parent, so I copied the logic to get
the path off of the existing module in the subname ==
NULL case. This seems to work.

2) I was fairly sure with my original 856103 patch,
"reload(mod)" and then "mod.newFunction()" would work.
But now the test case has to do "mod = reload(mod)" for
the "newFunction()" call to work.

I do not know whether this is related to something in
this patch or not.
History
Date User Action Args
2007-08-23 14:26:17adminlinkissue1029475 messages
2007-08-23 14:26:17admincreate