Commits

Arfrever Frehtes Taifersar Arahesis committed 77c8b15

Fix support for namespace packages with CPython 3.3.

  • Participants
  • Parent commits a2685f3

Comments (0)

Files changed (1)

File pkg_resources.py

 register_namespace_handler(ImpWrapper,file_ns_handler)
 register_namespace_handler(zipimport.zipimporter,file_ns_handler)
 
+try:
+    # CPython >=3.3
+    import _frozen_importlib
+except ImportError:
+    pass
+else:
+    register_namespace_handler(_frozen_importlib.FileFinder, file_ns_handler)
+
 
 def null_ns_handler(importer, path_item, packageName, module):
     return None