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

PEP 440 compliance: do not implicitly allow pre-releases #543

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

radoering
Copy link
Member

@radoering radoering commented Dec 22, 2022

Extracted from #402. Besides being a precondition of #402 it's a fix on its own. And it requires some coordination with downstream.

Requires: python-poetry/poetry#7225 and python-poetry/poetry#7236

PEP 440 says:

Pre-releases of any kind, including developmental releases, are implicitly excluded from all version specifiers, unless they are already present on the system, explicitly requested by the user, or if the only available version that satisfies the version specifier is a pre-release.

Nothing special about "> pre-release" or ">= pre-release"

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

LGTM with a negative test (discussed in maintainer's call).

… 440 compliant and counterproductive (If only a prerelease fulfills a constraint, we choose it anyway. If a stable release fulfills a constraint, we shouldn't choose a prerelease if not explicitly requested.)
@sonarcloud
Copy link

sonarcloud bot commented Jan 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.1% 1.1% Duplication

@radoering
Copy link
Member Author

Adapted existing test instead of removing it.

@radoering radoering merged commit 128c2cf into python-poetry:main Jan 20, 2023
@radoering radoering mentioned this pull request Jan 24, 2023
@radoering radoering deleted the pep-440-pre-release-handling branch November 24, 2024 12:40
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.

2 participants