In the requirements.txt for a Python library I am using, one of the requirements is specified like:
requirements.txt
mock-django~=0.6.10
What does ~= mean?
~=
It means it will select the latest version of the package, greater than or equal to 0.6.10, but still in the 0.6.* version, so it won't download 0.7.0 for example. It ensures you will get security fixes but keep backward-compatibility, if the package maintainer respects the semantic versioning (which states that breaking changes should occur only in major versions).
Or, as said by PEP 440:
For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses: >= 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.*
1.4m articles
1.4m replys
5 comments
57.0k users