pipenv
pipenv copied to clipboard
Default to the `~=` opperator when adding entries to pipfile
This might be quite opinionated, but tools like npm have similar behavior.
Npm will check the latest version available (eg x.y.z) and will specify the version as ^x.y.z.
One important difference though is that ^x.y.z, is equivalent (in python) to == x.*, >= x.y.z (for non-zero x),
while ~= x.y.z is equivalent to == x.y.*, >= x.y.z.
So either we
- Add our own non-official
^=operator that gets automatically translated (not a big fan), - Use
== x.*, >= x.y.z(assuming x is non-zero) - Use
~= x.y(assuming x is non-zero) - Use
~= x.y.z(assuming x is non-zero) not ideal because it doesn't allow minor increases
Additionally, it would be preferable if pipenv update would then also increase these specifiers.