Re: "requirement" corner case

Nick Coghlan <[email protected]> Thu, 30 Jan 2020 09:45:41 +1000
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CADiSq7dpQeV-x0o-s1Tc+ffi+vQzfu=F8o8011Rx13nrzKUexg@mail.gmail.com>
On Tue., 28 Jan. 2020, 3:52 pm Gordon Messmer, <[email protected]>
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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/archives/list/[email protected]/message/RPC6HZHYDT5MWEYDZY5XRF22RRHPMVG5/