From cd1e33d5567d9f892f8145beb4b39eeeafa760b9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 17 Dec 2012 15:15:53 -0500 Subject: Update changelog and add comment to registering of SourceFileLoader --HG-- branch : distribute extra : rebase_source : 2701f50b3375f9c2f2378ff22f274aade0b03107 --- CHANGES.txt | 3 +++ pkg_resources.py | 3 +++ 2 files changed, 6 insertions(+) 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) -- cgit v1.2.1