summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-12-17 15:15:53 -0500
committerJason R. Coombs <jaraco@jaraco.com>2012-12-17 15:15:53 -0500
commitcd1e33d5567d9f892f8145beb4b39eeeafa760b9 (patch)
tree47d7a09b6e988dcb2384f8e4f6596585a588b767
parent5854afbb1e30152e38dca1d9c70c1c4cb990e87d (diff)
downloadpython-setuptools-git-cd1e33d5567d9f892f8145beb4b39eeeafa760b9.tar.gz
Update changelog and add comment to registering of SourceFileLoader
--HG-- branch : distribute extra : rebase_source : 2701f50b3375f9c2f2378ff22f274aade0b03107
-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)