What is the equivalent of twiddle-wakka (~>) from ruby ​​gem in the .txt requirements file for python pip?

I saw the twiddle-wakka (~>) operator that was used in the ruby ​​gem ( documentation ) file to indicate the compatibility of the latest version point, for example:

'~> 0.3.1' is satisfied by 0.3.1, 0.3.2, 0.3.3, etc. '~> 0.3.1' is not satisfied by 0.3.0 '~> 0.3' is satisfied by 0.3.1, 0.4.0, 0.5.1, etc. '~> 0.3' is not satisfied by 0.2.0, 0.2.1, etc. 

I see that in requirements.txt there is a >= operator that can be used to indicate something better, but I hope to avoid any future package updates (major version updates) that will not be backward compatible with my code already - hence why i want twiddle-wakka.

Is there an equivalent statement for pip?

+4
source share
1 answer

Someday it will be the ~= compatible release statement specified by PEP 440 , but none of the common Python tools support it, not pip, nor the newborn setuptools unfork .

Now you need to manually specify it, for example,

 Django >= 1.4.3, < 1.5 
+7
source

Source: https://habr.com/ru/post/1487939/


All Articles