Skip to content

Instantly share code, notes, and snippets.

@froi
Last active July 20, 2023 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froi/e4802a135ffe49daa562ac72f187a8dc to your computer and use it in GitHub Desktop.
Save froi/e4802a135ffe49daa562ac72f187a8dc to your computer and use it in GitHub Desktop.
semver dependency spec

Dependency Specification

NOTE: This information was obtained from https://python-poetry.org/docs/dependency-specification/

Since I'm constantly forgetting about this, I'm adding it here.

Version constraints

Caret requirements

requirement versions allowed
^1.2.3 >=1.2.3 <2.0.0
^1.2 >=1.2.0 <2.0.0
^1 >=1.0.0 <2.0.0
^0.2.3 >=0.2.3 <0.3.0
^0.0.3 >=0.0.3 <0.0.4
^0.0 >=0.0.0 <0.1.0
^0 >=0.0.0 <1.0.0

Tilde requirements

requirement versions allowed
~1.2.3 >=1.2.3 <1.3.0
~1.2 >=1.2.0 <1.3.0
~1 >=1.0.0 <2.0.0

Wildcard requirements

requirement versions allowed
* >=0.0.0
1.* >=1.0.0 <2.0.0
1.2.* >=1.2.0 <1.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment