Commit 741f1742 authored by PJ Eby's avatar PJ Eby

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
parent 8f158d47
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment