aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-10-18 04:08:46 +0000
committerPJ Eby <distutils-sig@python.org>2005-10-18 04:08:46 +0000
commit741f1742fee6d55a6a278ff44215aaf0959381c5 (patch)
tree9a2b00762a46a8839f7d4ac12ab014afc2c5a584
parent8f158d47596b45487e91a9c1869fb965b8c90d74 (diff)
downloadexternal_python_setuptools-741f1742fee6d55a6a278ff44215aaf0959381c5.tar.gz
external_python_setuptools-741f1742fee6d55a6a278ff44215aaf0959381c5.tar.bz2
external_python_setuptools-741f1742fee6d55a6a278ff44215aaf0959381c5.zip
Hurray! Our first dependency processing bug! This is cool because it
means that people are finally doing enough things with setuptools to have real-life version conflict scenarios. Luckily, the fix is trivial: use breadth-first instead of depth-first dependency processing, which I thought we were already doing anyway, but weren't. And we were giving precedence to already-installed packages, which means upgrades didn't work so well. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041265
-rwxr-xr-xEasyInstall.txt7
-rw-r--r--pkg_resources.py2
-rwxr-xr-xpkg_resources.txt4
-rwxr-xr-xsetuptools/command/easy_install.py2
4 files changed, 13 insertions, 2 deletions
diff --git a/EasyInstall.txt b/EasyInstall.txt
index 6fcbcd16..3efc80f1 100755
--- a/EasyInstall.txt
+++ b/EasyInstall.txt
@@ -855,6 +855,13 @@ Known Issues
* Improved Windows ``.exe`` script wrappers so that the script can have the
same name as a module without confusing Python.
+ * Changed dependency processing so that it's breadth-first, allowing a
+ depender's preferences to override those of a dependee, to prevent conflicts
+ when a lower version is acceptable to the dependee, but not the depender.
+ Also, ensure that currently installed/selected packages aren't given
+ precedence over ones desired by a package being installed, which could
+ cause conflict errors.
+
0.6a3
* Improved error message when trying to use old ways of running
``easy_install``. Removed the ability to run via ``python -m`` or by
diff --git a/pkg_resources.py b/pkg_resources.py
index 6717c2ad..e43201d4 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -467,7 +467,7 @@ class WorkingSet(object):
to_activate = []
while requirements:
- req = requirements.pop()
+ req = requirements.pop(0) # process dependencies breadth-first
if req in processed:
# Ignore cyclic or redundant dependencies
continue
diff --git a/pkg_resources.txt b/pkg_resources.txt
index d8198f5f..1f3e47fe 100755
--- a/pkg_resources.txt
+++ b/pkg_resources.txt
@@ -1499,6 +1499,10 @@ Release Notes/Change History
non-namespace modules have already been imported and issues a warning if
a conflicting module has already been imported.
+ * Changed dependency processing so that it's breadth-first, allowing a
+ depender's preferences to override those of a dependee, to prevent conflicts
+ when a lower version is acceptable to the dependee, but not the depender.
+
0.6a4
* Fix a bug in ``WorkingSet.resolve()`` that was introduced in 0.6a3.
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index d85858a7..c076a5fd 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -394,7 +394,7 @@ class easy_install(Command):
return
try:
- WorkingSet(self.shadow_path).resolve(
+ WorkingSet([]).resolve(
[requirement], self.local_index, self.easy_install
)
except DistributionNotFound, e: