Commits

Arfrever Frehtes Taifersar Arahesis  committed a2685f3

Add support for CPython 3.3.

  • Participants
  • Parent commits ef2da25

Comments (0)

Files changed (1)

File pkg_resources.py

 
 register_loader_type(type(None), DefaultProvider)
 
+try:
+    # CPython >=3.3
+    import _frozen_importlib
+except ImportError:
+    pass
+else:
+    register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider)
+
 
 class EmptyProvider(NullProvider):
     """Provider that returns nothing for all requests"""
                         break
 register_finder(ImpWrapper,find_on_path)
 
+try:
+    # CPython >=3.3
+    import _frozen_importlib
+except ImportError:
+    pass
+else:
+    register_finder(_frozen_importlib.FileFinder, find_on_path)
+
 _declare_state('dict', _namespace_handlers={})
 _declare_state('dict', _namespace_packages={})