You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
imp.new_module does not function correctly if the module is returned from a function and used directly #51389
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2013-07-31.09:36:01.655>created_at=<Date2009-10-15.11:24:51.053>labels= ['type-bug', 'library']
title='imp.new_module does not function correctly if the module is returned from a function and used directly'updated_at=<Date2013-07-31.09:36:01.653>user='https://bugs.python.org/jkp'
See the testcase included. If you instead assign the result of the
get_module() call to a variable and then make the call to the function
defined in that module it works as expected.
Activity
jkp commentedon Oct 15, 2009
See the testcase included. If you instead assign the result of the
get_module() call to a variable and then make the call to the function
defined in that module it works as expected.
jkp commentedon Oct 15, 2009
Updated the testcase to show that the __dict__ for the module is incorrect
unless the module is assigned to a temp variable.
benjaminp commentedon Oct 15, 2009
Fixed in r75437.
benjaminp commentedon Oct 12, 2010
Rebroken in r85392. See bpo-10068.
terryjreedy commentedon Oct 15, 2010
Since that revision only touched py3k, I am guessing that it only broke 3.2.
Arfrever commentedon Nov 15, 2010
But there were r85393 (2.7) and r85394 (3.1).
pitrou commentedon Jul 31, 2013
Work in progress in bpo-18214.