Skip to content
Commit 950415ca authored by Jongbin Park's avatar Jongbin Park Committed by Sébastien Eustace
Browse files

Fix PEP440 compatible release (`~=`) handling (#1815)

* Fix PEP440 compatible release (`~=`) handling

PEP440 compatible release version range (`~=`) should have itself as a minimum
value. Examples from [official
doc](https://python.org/dev/peps/pep-0440/#compatible-release) (each pair is
equivalent):

```
~=2.2
>=2.2, ==2.*

~=1.4.5
>=1.4.5, ==1.4.*

~=2.2.post3
>=2.2.post3, ==2.*

~=1.4.5a4
>=1.4.5a4, ==1.4.*
```

In every case, lower bound is exactly same as the input version. Current
incorrect behavior was originally introduced 2 years ago by commit c55d55a8,
where it tried to reset patch version to 0 for tilde expression.

Closes #1150.

* Fix Black lint
parent ce9ea77d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment