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

markers: add special handling for extra #636

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

radoering
Copy link
Member

  • Added tests for changed code.
  • Updated documentation for changed code.

extra is not like any other marker, it is, well, "extra". Whereas normal markers can only have one value at a time, extra can have multiple values at the same time.

For example, a marker like sys_platform == "win32" and sys_platform == "linux" can never be fulfilled because sys_platform can only be either "win32" or "linux" (not both). By contrast, a marker like extra == "a" and extra == "b" can be fulfilled if both extras are requested.

Therefore, this PR disables some simplifications for extra markers. Further, it adds the option to validate environments with multiple extras and makes the validation robust against unnormalized names.

src/poetry/core/version/markers.py Outdated Show resolved Hide resolved
src/poetry/core/version/markers.py Show resolved Hide resolved
@radoering radoering force-pushed the extra-marker branch 2 times, most recently from e1d4136 to 532cec2 Compare September 9, 2023 14:49
@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 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
0.0% 0.0% Duplication

@radoering radoering merged commit 8db9d2f into python-poetry:main Sep 11, 2023
19 checks passed
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.

3 participants