4

I haven't found it in the docs, but I see in pyproject.toml files in poetry things like:

psycopg2-binary="^2.9.1"

what does the ^ mean?

Thanks!

David Masip
  • 2,146
  • 1
  • 26
  • 46
  • 2
    https://python-poetry.org/docs/dependency-specification/#caret-requirements – Amadan Jun 21 '22 at 07:14
  • In your example, the leftmost nonzero digit of "2.9.1" is "2", and a change to "3" is prevented. So, "^2.9.1" would be interpreted as ">=2.9.1 <3.0.0" – qrsngky Jun 21 '22 at 07:21

1 Answers1

5

You can read it as psycopg2-binary="2.x".

The way I see it, is that it's effectively an extension of the psycopg2-binary="~2.1.0" convention, which indicates "2.1.x".

EDIT: I got it backwards. Edited so it's correct now. See this post explaining it. Why there is a ^ Cap symbol in `pubspec.yaml` file under dependencies

Examples:

meta: ^1.1.6 - equivalent to >=1.1.6 <2.0
equatable: ^0.2.3 - equivalent to >=0.2.3 <0.3.0
cupertino_icons: ^0.1.2 - equivalent to >=0.1.2 <0.2.0