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 dabeaz
Recipients brett.cannon, dabeaz, eric.snow, ncoghlan
Date 2015-03-11.15:28:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426087689.15.0.984036648795.issue23642@psf.upfronthosting.co.za>
In-reply-to
Content
inal comment.  It seems that one can generally avoid a lot of nastiness if importlib.reload() is used instead.  For example:

>>> mod = sys.modules[spec.name] = module_from_spec(spec)
>>> importlib.reload(mod)

This works for both source and Extension modules and completely avoids the need to worry about the exec_module()/load_module() warts.   Wouldn't say it's an obvious approach though ;-).
History
Date User Action Args
2015-03-11 15:28:09dabeazsetrecipients: + dabeaz, brett.cannon, ncoghlan, eric.snow
2015-03-11 15:28:09dabeazsetmessageid: <1426087689.15.0.984036648795.issue23642@psf.upfronthosting.co.za>
2015-03-11 15:28:09dabeazlinkissue23642 messages
2015-03-11 15:28:09dabeazcreate