Commits

Dirkjan Ochtman committed f95bf0e

Minimize impact of namespace package support for CPython 3.3.

This solves a regression with an admittedly obscure use case involving
Mercurial's demandimport implementation, but it also seems like neater code.

  • Participants
  • Parent commits ecb948a

Comments (0)

Files changed (1)

File pkg_resources.py

 
 register_loader_type(type(None), DefaultProvider)
 
-try:
-    # CPython >=3.3
+if sys.version_info[:2] >= 3.3:
     import _frozen_importlib
-except ImportError:
-    pass
-else:
     register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider)