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?
Of course, since there's no defined semantics for this, I could also
simply refuse a conversion and bail out if we come across this corner case.
I'd also recommend filing an issue with the projects publishing the
ambiguous requirements.
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.
--
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/VZTGVKWXIUCW6ZHXBPBC732KLNWE2ZNC/