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 #5928

Closed
wants to merge 11 commits into from

Conversation

micheleAlberto
Copy link

Fix 'PackageFinder.find_all_candidates' to respect 'allow_all_prereleases'

Closes #5175

This is another PR following #5927 to address comments raised by @benoit-pierre to ensure that if there is a pre-release in the requirements then prerelease packages are allowed to be installed.

@pganssle
Copy link
Member

This supercedes #5927, right?

@pganssle
Copy link
Member

@micheleAlberto I believe this is currently failing due to linting. Can you run flake8 over your PR and fix anything that's raising warnings?

@benoit-pierre
Copy link
Member

Not just linting. Use tox -e 'lint-{py2,py3}' to run flake. And I suggest running the testsuite at least with your current interpreter and address the failures before pushing:

  • tox -e py -- -m unit to run the unit tests
  • tox -e py -- -m integration to run the integration tests (this take some time, pytest-xdist is avaliable, so you append something -n3 to distribute the test load on 3 processes)

@uranusjr
Copy link
Member

uranusjr commented Oct 26, 2018

I wonder if this is the correct fix. find_all_candidates is supposed to do what the name indicates—find all possible candidates. Version filtering is performed later down the line (immediately after, in fact, by req.specifier.filter).

pip can already exclude prereleases correctly when you pip install/download/etc., the only one that behaves incorrectly is the check for latest pip. This should be fixed by modifying how pip_version_check uses the result of find_all_candidates instead, IMO.

@cjerdonek cjerdonek added the C: finder PackageFinder and index related code label Oct 27, 2018
@cjerdonek
Copy link
Member

The comments by @uranusjr seem valid. @micheleAlberto, do you have any reply / do you agree?

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will be eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Jan 7, 2019
@lock
Copy link

lock bot commented May 28, 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 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 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 C: finder PackageFinder and index related code needs rebase or merge PR has conflicts with current master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip 9 offers upgrades to prereleases
7 participants