@tmlcoch can you please rebase this on master
Pull-Request has been rebased
@ausil Done
Sorry I haven't had a chance to fully review this yet. I should have some time later this week. I do have a few questions though:
Is the memoization (PROFILE_MODULES global) in get_profile_module needed? It looks like the imp function handles this for us, or does that fail to work in some cases?
It looks like the reason for the "mod.get_profile_module = get_profile_module" line is to make sure we get the correct PROFILE_MODULES global. If we drop that global, can we also drop this bit?
Hi @mikem, thanks for your time! The reason why PROFILE_MODULES is used is that when a user call get_profile_module to get the same module several times I want to always return the exactly same module (including all monkey patches, attributes or hacks which could be included there by user). The imp.load_module reloads a module when it was already imported - i.e. it destroy all changes that were done to the module.
PROFILE_MODULES
get_profile_module
imp.load_module
thanks, rebasing and pulling in
Pull-Request has been closed by mikem