On Thu., 30 Jan. 2020, 10:02 am Gordon Messmer, <gordon.mess...@gmail.com>
wrote:

> On 1/29/20 3:45 PM, Nick Coghlan wrote:
> >
> >     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.
>
>
> If "!= 1.0.*" is implied, wouldn't ">= 1.1" be the logical translation?
> If "> 1.0.*" is converted to "> 1.0", then 1.0.1 would be acceptable,
> correct?
>

Yep, you're right. That means the translations would be:

">= 1.0.*": odd way of writing ">= 1.0" (since anything accepted by the
prefix match would also be accepted as newer than 1.0)

"> 1.0.*": odd way of writing ">= 1.1" (since anything older than 1.1 would
be excluded by the prefix match)

I haven't actually seen a project publishing this, I'm just trying to
> convert all of the conversion types that pkg_resources.Requirement will
> parse without throwing an exception, like it will for "~= 1.0.*" or "~=
> 1".  (Unless your guidance is that I refuse undefined semantics).
>
> https://github.com/gordonmessmer/pyreq2rpm/
>
> Thanks for getting back to me.
>

For this kind of automation project, accepting them, but converting them to
more conventional spellings would make sense.

It would likely be good if twine refused to upload them to PyPI, though
(and/or PyPI refused to allow them to be uploaded).

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/CXCCHDWERMIIG4T4J2LVNKXCLQGMXIVQ/

Reply via email to