repositories: deprecate default option and introduce possibility to disable PyPI explicitly#7430
Closed
radoering wants to merge 1 commit intopython-poetry:masterfrom
Closed
repositories: deprecate default option and introduce possibility to disable PyPI explicitly#7430radoering wants to merge 1 commit intopython-poetry:masterfrom
default option and introduce possibility to disable PyPI explicitly#7430radoering wants to merge 1 commit intopython-poetry:masterfrom
Conversation
9121ba1 to
0974a97
Compare
0974a97 to
e12ddb5
Compare
e12ddb5 to
bbeae93
Compare
|
Deploy preview for website ready! Built with commit 3e91102. |
…ble the implicit default source PyPI explicitly
bbeae93 to
3e91102
Compare
2 tasks
2 tasks
2 tasks
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related-to: #6713
Motivation
While reviewing #6879, I figured out that there is a huge inconsistence between the implementation and the documentation of the
defaultsource (originally posted in #6879 (review)):default, PyPI is only thedefaultif there is noprimary, otherwise it'ssecondary.defaultis the highest priority. In other words, implicit PyPI always comes afterprimarybut is not always thedefault.secondarysources. It does not clearly say but implies that if there is no explicitdefault, PyPI always is thedefault. If you combine everything, it seemsprimarysources should take precedence over thedefaultsource (even if it's not PyPI).In my opinion, the documentation makes more sense, but changing the implementation to match the documentation is a breaking change because it puts the explicit
defaultsource from highest priority to lower than all primary sources.Thinking a bit about the problem, I came to the conclusion that we do not really need to explicitly specify a
defaultsource if we had another option to disable PyPI. Currently, specifying adefaultsource has two effects:The second effect is not really required because you can achieve the same result by making the source the first one in pyroject.toml.
The first effect is kind of implicit and from an UI perspective probably shouldn't be coupled to a specific repository. That's why I think we should deprecate configuring sources as
defaultand introduce an option to disable PyPI.Implementation details
default=truefor sourcespoetry source default:--enable-pypi,--disable-pypipyproject.toml: