-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VersionRange breaks if range is not in order #455
Comments
Taking a closer look this is "as designed" but i am not sure if it is intended. It is also _VersionRangeParser breaking of course. I guess my question is if i have to sanitize versions before passing them to _VersionRangeParser or create a PR that adds support for flipped range bounds to version_range_regex |
If this is reporting as a sytax error then I'd consider it a bug.
It's been ages since I touched that code so I don't recall how it's being
implemented, but I'd say that if commas are present then it'd be reasonable
to treat them as an AND - ie, create ranges for each comma-separated token,
then union them.
…On Tue, Sep 12, 2017 at 12:32 AM, Thorsten Kaufmann < ***@***.***> wrote:
Taking a closer look this is "as designed" but i am not sure if it is
intended. It is also _VersionRangeParser breaking of course. I guess my
question is if i have to sanitize versions before passing them to
_VersionRangeParser or create a PR that adds support for flipped range
bounds to version_range_regex
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#455 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABjqSrUZpsJL9j7ZU_YR4eURpCj_gOQ6ks5shUR_gaJpZM4PS7Id>
.
|
I just took a look and essentially it is a huge regex that does expect lower_bound,upper_bound only. I will take a look but i suck with regexes so i am not sure if i can get that to work. It seems to affect quite a few packages here now though and i wonder if anything on the pip / pypi side has changed? I don't remember that happening before. |
Mmm, I'll have to take a look.
A
…On Tue, Sep 12, 2017 at 5:56 PM, Thorsten Kaufmann ***@***.*** > wrote:
I just took a look and essentially it is a huge regex that does expect
lower_bound,upper_bound only. I will take a look but i suck with regexes so
i am not sure if i can get that to work. It seems to affect quite a few
packages here now though and i wonder if anything on the pip / pypi side
has changed? I don't remember that happening before.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#455 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABjqSt41DHl9xE8d9izfYHnqCT29nw6Xks5shjkSgaJpZM4PS7Id>
.
|
A colleague of mine @PatrickFoerster extended the regex in version.py to support both ascending and descending order. With the cases i had this works fine. Here is the MR: #470 |
Fixed by #618 |
I am not 100% sure this is a bug or may be expected and/or wanted. As mentioned before i have my own incarnation of rez-pip mostly for windows versions. It fails when installing requests with dependencies because the urllib3 requirement is stated in "inverse" order.
I am unsure where this comes from. It seems fine in the setup.py of requests but it is inverted on pypi already so it is not being interpreted wrong within rez or distlib.
Anyways it is easy to reproduce:
The first one works the second breaks with a Syntax Error:
PackageRequest(u'urllib3-<1.23,>=1.21.1') raised VersionError(u"Syntax error in version range '<1.23,>=1.21.1': Syntax error in version range '<1.23,>=1.21.1'",)
The text was updated successfully, but these errors were encountered: