Skip to content

Commit

Permalink
Revert "Always add dependencies of a package, even if the strictness …
Browse files Browse the repository at this point in the history
…is 3"

This reverts commit 3077dc1.

This causes some serious performance regressions in some cases (conda create
-n anaconda python=2.7 numpy=1.6 takes 1:30 before this change and 7:30
after).
  • Loading branch information
asmeurer committed Sep 18, 2014
1 parent a01f17d commit c4c844b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
3 changes: 2 additions & 1 deletion conda/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ def add_dependents(fn1, max_only=False):
continue
res[pkg2.fn] = pkg2
try:
add_dependents(pkg2.fn, max_only=max_only)
if ms.strictness < 3:
add_dependents(pkg2.fn, max_only=max_only)
except NoPackagesFound as e:
for pkg in e.pkgs:
if pkg not in notfound:
Expand Down
29 changes: 0 additions & 29 deletions tests/test_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,32 +1143,3 @@ def test_no_features():
'tk-8.5.13-0.tar.bz2',
'zlib-1.2.7-0.tar.bz2',
]][0]

def test_mixed_strictness():
# Don't behave differently for strictness == 3 in the dependencies
index2 = index.copy()
index2['package1-1.0-0.tar.bz2'] = {
'build': '0',
'build_number': 0,
'depends': ['pandas 0.11.0 np17py33_1', 'python 3.3*', 'numpy 1.7*'],
'name': 'package1',
'version': '1.0',
}
r = Resolve(index2)

assert r.solve2(['package1'], set()) == [
'dateutil-2.1-py33_1.tar.bz2',
'numpy-1.7.1-py33_0.tar.bz2',
'openssl-1.0.1c-0.tar.bz2',
'package1-1.0-0.tar.bz2',
'pandas-0.11.0-np17py33_1.tar.bz2',
'python-3.3.2-0.tar.bz2',
'pytz-2013b-py33_0.tar.bz2',
'readline-6.2-0.tar.bz2',
'scipy-0.12.0-np17py33_0.tar.bz2',
'six-1.3.0-py33_0.tar.bz2',
'sqlite-3.7.13-0.tar.bz2',
'system-5.8-1.tar.bz2',
'tk-8.5.13-0.tar.bz2',
'zlib-1.2.7-0.tar.bz2',
]

0 comments on commit c4c844b

Please sign in to comment.