summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt3
-rw-r--r--pkg_resources.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index d5a1792a..6f6d9a8d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,6 +9,9 @@ CHANGES
* Fix 2 errors with Jython 2.5.
* Fix 1 failure with Jython 2.5 and 2.7.
* Disable workaround for Jython scripts on Linux systems.
+* Fix issue in pkg_resources where try/except around a platform-dependent
+ import would trigger hook load failures on Mercurial. See pull request 32
+ for details.
------
0.6.32
diff --git a/pkg_resources.py b/pkg_resources.py
index 53978086..717c1e6a 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1325,6 +1325,9 @@ class DefaultProvider(EggProvider):
register_loader_type(type(None), DefaultProvider)
+# Python 3.3 also supplies the SourceFileLoader.
+# Don't be tempted to do a try/except block here - it will break Mercurial
+# hooks due to the demandimport functionality.
if sys.version_info[:2] >= (3,3):
import _frozen_importlib
register_loader_type(_frozen_importlib.SourceFileLoader, DefaultProvider)