Open trim21 opened 3 months ago
pep440 provice a lax regex and a canonical regex, could we have a strict version check with canonical regex?
which mean, 0.0.1.a0 is invalid, and it's normalized result 0.0.1a0 is valid.
0.0.1.a0
0.0.1a0
This can be done with packaing package https://github.com/pypa/packaging/blob/main/tests/test_version.py
import packaging.version def strict_pep440(s: str): assert s == str(packaging.version.Version(s))
I can send a pr for this.
pep440 provice a lax regex and a canonical regex, could we have a strict version check with canonical regex?
which mean,
0.0.1.a0
is invalid, and it's normalized result0.0.1a0
is valid.This can be done with packaing package https://github.com/pypa/packaging/blob/main/tests/test_version.py
I can send a pr for this.