Skip to content

Conversation

@radoering
Copy link
Member

Resolves: python-poetry/poetry#4729

Partially overlaps with #379 but only considers simple version (not ranges).

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

According to PEP 440:

For example, given the version 1.1.post1, the following clauses would match or not as shown:

== 1.1 # Not equal, so 1.1.post1 does not match clause
== 1.1.post1 # Equal, so 1.1.post1 matches clause
== 1.1.* # Same prefix, so 1.1.post1 matches clause

and

If the specified version identifier is a public version identifier (no local version label), then the local version label of any candidate versions MUST be ignored when matching versions.

If the specified version identifier is a local version identifier, then the local version labels of candidate versions MUST be considered when matching versions, with the public version identifier being matched as described above, and the local version label being checked for equivalence using a strict string equality comparison.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 2022

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.8% 0.8% Duplication

@abn abn merged commit 8c7caa1 into python-poetry:main Jun 12, 2022
@radoering radoering mentioned this pull request Jul 9, 2022
@radoering radoering deleted the fix-allows-post-and-local-version branch November 24, 2024 12:41
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.

Version matching bug (or feature)?

3 participants