[Python-checkins] r51937 - in sandbox/branches/setuptools-0.6: pkg_resources.py pkg_resources.txt setuptools.egg-info/entry_points.txt

phillip.eby python-checkins at python.org
Wed Sep 20 22:57:09 CEST 2006


Author: phillip.eby
Date: Wed Sep 20 22:57:09 2006
New Revision: 51937
Modified:
 sandbox/branches/setuptools-0.6/pkg_resources.py
 sandbox/branches/setuptools-0.6/pkg_resources.txt
 sandbox/branches/setuptools-0.6/setuptools.egg-info/entry_points.txt
Log:
More Python 2.5 compatibility fixes.
Modified: sandbox/branches/setuptools-0.6/pkg_resources.py
==============================================================================
--- sandbox/branches/setuptools-0.6/pkg_resources.py	(original)
+++ sandbox/branches/setuptools-0.6/pkg_resources.py	Wed Sep 20 22:57:09 2006
@@ -1502,13 +1502,13 @@
 pass
 return importer
 
-
-
-
-
-
-
-
+try:
+ from pkgutil import get_importer, ImpImporter
+except ImportError:
+ pass # Python 2.3 or 2.4, use our own implementation
+else:
+ ImpWrapper = ImpImporter # Python 2.5, use pkgutil's implementation
+ del ImpLoader, ImpImporter
 
 
 
Modified: sandbox/branches/setuptools-0.6/pkg_resources.txt
==============================================================================
--- sandbox/branches/setuptools-0.6/pkg_resources.txt	(original)
+++ sandbox/branches/setuptools-0.6/pkg_resources.txt	Wed Sep 20 22:57:09 2006
@@ -1665,6 +1665,10 @@
 "importer" object. This ``ImpWrapper`` is *not* cached; instead a new
 instance is returned each time.
 
+ (Note: When run under Python 2.5, this function is simply an alias for
+ ``pkgutil.get_importer()``, and instead of ``pkg_resources.ImpWrapper``
+ instances, it may return ``pkgutil.ImpImporter`` instances.)
+
 
 File/Path Utilities
 -------------------
@@ -1687,6 +1691,9 @@
 Release Notes/Change History
 ----------------------------
 
+0.6c3
+ * Python 2.5 compatibility fixes.
+
 0.6c2
 * Fix a problem with eggs specified directly on ``PYTHONPATH`` on
 case-insensitive filesystems possibly not showing up in the default
Modified: sandbox/branches/setuptools-0.6/setuptools.egg-info/entry_points.txt
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools.egg-info/entry_points.txt	(original)
+++ sandbox/branches/setuptools-0.6/setuptools.egg-info/entry_points.txt	Wed Sep 20 22:57:09 2006
@@ -28,7 +28,7 @@
 
 [console_scripts]
 easy_install = setuptools.command.easy_install:main
-easy_install-2.3 = setuptools.command.easy_install:main
+easy_install-2.4 = setuptools.command.easy_install:main
 
 [distutils.commands]
 bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /