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

Allow pipenv option to consider all listed package sources when syncing the Pipfile.lock #5039

Merged
merged 7 commits into from
Apr 21, 2022

Conversation

matteius
Copy link
Member

@matteius matteius commented Apr 10, 2022

The issue

Maybe we can allow an option install_search_all_sources where its possible to still consider all sources eligible for install, since the hashes of the lock file were generated from index restricted packages and are pinned to specific versions and hashes in the lockfile.

The fix

Fix #5041

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@matteius matteius changed the title comment out logic that makes pip install strict with respect to indexes. Allow pipenv option to have install consider all listed package sources when syncing the Pipfile.lock Apr 10, 2022
@matteius matteius changed the title Allow pipenv option to have install consider all listed package sources when syncing the Pipfile.lock Allow pipenv option to consider all listed package sources when syncing the Pipfile.lock Apr 10, 2022
@matteius matteius requested a review from oz123 April 10, 2022 16:05
@@ -1484,23 +1482,26 @@ def pip_install(
ignore_hashes = False
line = None
# Try installing for each source in project.sources.
search_all_sources = project.settings.get("install_search_all_sources", False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add public facing documentation for this option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- I am going to add that once we decide if this should be what its name is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name install_search_all_sources is OK. Once you write the docs for this, you can figure if this works or not.

Copy link
Member Author

@matteius matteius Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squeezing this into tonight's release -- let me know if there are any follow up tweaks you want to see to the docs or this PR and I can get them in a subsequent PR.

@matteius matteius merged commit dc8ac38 into main Apr 21, 2022
@matteius matteius deleted the less-strict-index-install-option branch April 21, 2022 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow pipenv sync to try alternative pip index urls as long as hashes match.
2 participants