python-localimport
python-localimport copied to clipboard
Enhance auto-conflict resolve for namespace packages
Currently, if a package is detected with _localimport._deduce() and conflicts with a module that is already imported, that module is removed from sys.modules temporarily (and moved to _localimport.state['disables']).
However, there might be a root.foo and root.bar in the global site, but only root.bar in the local site. The current approach simply gets rid of root and its submodules alltogether, but it would only need to disableroot.bar.