Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PackageFinder to respect allow_all_prereleases #5927

Closed
wants to merge 7 commits into from

Conversation

sauhard
Copy link

@sauhard sauhard commented Oct 26, 2018

Fix 'PackageFinder.find_all_candidates' to respect 'allow_all_prereleases'
Closes #5175

@benoit-pierre
Copy link
Member

benoit-pierre commented Oct 26, 2018

You broke this use case:

$ cp tests/data/packages/simplewheel-1.0-py2.py3-none-any.whl index/foo-1.0-py2.py3-none-any.whl
$ cp tests/data/packages/simplewheel-1.0-py2.py3-none-any.whl index/foo-1.0b1-py2.py3-none-any.whl
$ python src/pip download --no-deps -f index 'foo>=2.0b1'
Looking in links: index
Collecting foo>=1.0
  Saved ./foo-1.0-py2.py3-none-any.whl
Successfully downloaded foo
# Instead of:
$ git checkout master
$ python src/pip download --no-deps -f index 'foo>=2.0b1'                                        
Looking in links: index
Collecting foo>=2.0b1
  Saved ./foo-2.0b1-py2.py3-none-any.whl
Successfully downloaded fo

As evidenced by the fact that you had to patch test_finder_installs_pre_releases_with_version_spec to make the test pass.

@micheleAlberto
Copy link

I misunderstood the meaning of that test; will follow up

@benoit-pierre
Copy link
Member

benoit-pierre commented Oct 26, 2018

OK, I had made a mess of the test... The point is: when using a requirement with a version specifiers using a pre-release, then pre-releases should be allowed (same as if --pre was used).

@micheleAlberto
Copy link

I opened #5928 and suggest to close this one

@pradyunsg pradyunsg closed this Oct 27, 2018
@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip 9 offers upgrades to prereleases
4 participants