python-semanticversion currently appears to support "canonical" NPM version specs, as according to their range.bnf, but the node-semver implementation also accepts a superset of that syntax as valid.
For example, the implementation allows spaces between the prefix and the version (> 1.2.3), or additional whitespace within a hyphen-range (0.1.2 - 3.4.5).
It also has a ~> prefix, which appears to be equivalent to ~.
The NpmSpec does not accept these as valid, and raises a ValueError.
I believe that NpmSpec should aim to be equivalent to the node-semver implementation, correctly parsing anything NPM accepts as valid.
Note also the related issue npm/node-semver#392, which goes into more detail about the discrepancy between the syntax definition and the implementation.
python-semanticversioncurrently appears to support "canonical" NPM version specs, as according to their range.bnf, but thenode-semverimplementation also accepts a superset of that syntax as valid.For example, the implementation allows spaces between the prefix and the version (
> 1.2.3), or additional whitespace within a hyphen-range (0.1.2 - 3.4.5).It also has a
~>prefix, which appears to be equivalent to~.The
NpmSpecdoes not accept these as valid, and raises aValueError.I believe that
NpmSpecshould aim to be equivalent to thenode-semverimplementation, correctly parsing anything NPM accepts as valid.Note also the related issue npm/node-semver#392, which goes into more detail about the discrepancy between the syntax definition and the implementation.