Commit ae6ebd78 authored by Alex Grönholm's avatar Alex Grönholm

Remove the import hook when unloading the old pkg_resources modules

--HG--
branch : agronholm/remove-the-import-hook-when-unloading-th-1458177009332
parent e570a849
......@@ -192,6 +192,11 @@ def _conflict_bail(VC_err, version):
def _unload_pkg_resources():
from pkg_resources.extern import VendorImporter
sys.meta_path = [importer for importer in sys.meta_path if
not isinstance(importer, VendorImporter)]
del VendorImporter
del_modules = [
name for name in sys.modules
if name.startswith('pkg_resources')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment