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
  • Branches default

Comments (0)

Files changed (1)


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