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

Compare across pre-release #90

Open
sergiotomasello opened this issue Dec 30, 2019 · 1 comment
Open

Compare across pre-release #90

sergiotomasello opened this issue Dec 30, 2019 · 1 comment
Labels
Status:DesignNeeded This issue is waiting for somewhat to suggest a new design Topic:API Improvements to the library API Type:Enhancement

Comments

@sergiotomasello
Copy link

Is there a way to create a requirement spec which includes all ( * ,x) pre-releases ?

ie:

v = semantic_version.Version('1.0.0-rc.1')
ss1 = semantic_version.SimpleSpec('>=1.0.0-*') # => Exception

The only thing that works is the following:

ss2 = semantic_version.SimpleSpec('>=1.0.0-rc')

It satisfies all 1.0.0-rc.* Versions including 1.0.0

@rbarrois
Copy link
Owner

rbarrois commented Jan 1, 2020

Not currently; this doesn't exist for two reasons:

  • Working with pre-release versions is always complex, and seldom useful;
  • Since SimpleSpec implements an ad-hoc matching specification, many corner cases may have been forgotten.

How would you intuitively express "I want 1.0.0, including any pre-release"? Maybe we can include that in the ad-hoc spec and implement it :)

This should also:

  • Not change the current semantics by including pre-release versions where they previously weren't included;
  • Not overlap a similar range specification (I'd like to stick to the "There should be one-- and preferably only one --obvious way to do it" approach)
  • Be consistent with the rest of the spec...

Thanks ;)

@rbarrois rbarrois added Status:DesignNeeded This issue is waiting for somewhat to suggest a new design Topic:API Improvements to the library API Type:Enhancement labels Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:DesignNeeded This issue is waiting for somewhat to suggest a new design Topic:API Improvements to the library API Type:Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants