On Tue., 28 Jan. 2020, 3:52 pm Gordon Messmer, <gordon.mess...@gmail.com>
wrote:

> I'm working on tools to convert python packaging data to rpm spec
> files.  Most of the conversions are relatively straightforward, but
> there's an odd corner case with ">" and versions ending in ".*".  That
> combination is parsed as a valid specification, but oddly, it seems to
> behave the same as ">= version", as demonstrated below.  Is this
> intentional, or is it a byproduct of parsing ">1.0.*" as a
> LegacySpecifier?
>

It's definitely not intentional, as PEP 440 only defines semantics for
prefix matching in the context of "==" and "!=".


> Should I convert ">1.0.*" into ">=1.0" and mimic the current behavior,
> or into something else, like "> 1.0", or ">= 1.1"?
>

Converting into "> 1.0" would make sense, as there's an implied "!= 1.0.*"
in the use of the exclusive operator.

I'd also recommend filing an issue with the projects publishing the
ambiguous requirements.

Cheers,
Nick.


>
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/RPC6HZHYDT5MWEYDZY5XRF22RRHPMVG5/

Reply via email to