2

According to this question and it's links to elsewhere, I learned that ~= V.N is the same as >= V.N, == V.*

For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses:

>= V.N, == V.*

PEP 440 Compatible Release

But what does ~> V.N mean? Does it just mean > V.N, == V.*, indicating that version V.N would not satisfy the requirement, but that V.(N+1) would?


Note: I haven't seen anywhere that this notation has been used, but GitHub recently sent a security alert saying to update one requirements.txt to use this syntax.

Community
  • 1
  • 1
Stephen C
  • 1,966
  • 1
  • 16
  • 30

1 Answers1

4

This ~> is not a valid requirement specifier in Python.

The security alert must be talking about another language - perhaps it was a Gemfile (Ruby)?

wim
  • 338,267
  • 99
  • 616
  • 750
  • 1
    Looks like I misunderstood GitHub. They meant "update to this version number", when I thought they were providing the actual line of text that should be included in the requirements.txt. Kind of confusing when it looks so close to the actual syntax for these things... – Stephen C Feb 13 '19 at 20:47