diff options
author | Brett Cannon <brett@python.org> | 2013-04-28 15:53:26 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-04-28 15:53:26 (GMT) |
commit | 5a4c233a9e6450919ddea78d7df22a76b4758322 (patch) | |
tree | ca34b88be6c69243904e3e3cde0d9e7927d0dc92 /Misc | |
parent | 9330a94467af5b9878ef0fb30da45d964cd735df (diff) | |
download | cpython-5a4c233a9e6450919ddea78d7df22a76b4758322.zip cpython-5a4c233a9e6450919ddea78d7df22a76b4758322.tar.gz cpython-5a4c233a9e6450919ddea78d7df22a76b4758322.tar.bz2 |
Issue #17358: imp.load_source() and load_compiled() should now return
modules which will typically work when reloaded.
A hack is used to support these functions as their API allowed them to
pass in a file object but then operate as if import had loaded them.
Unfortunately the hack kept a reference around for the file object
passed in which would be unusable on reload since it had been closed.
The solution is to simply use the hack for the initial load but then a
proper loader on the module so that imp.reload() at least has a chance
to work.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -39,6 +39,9 @@ Core and Builtins Library ------- +- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by + extention load_module()) now have a better chance of working when reloaded. + - Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures - Issue #11714: Use 'with' statements to assure a Semaphore releases a |