Split up Windows tests relying on urlunparse behaviour#12788
Merged
Split up Windows tests relying on urlunparse behaviour#12788
Conversation
Contributor
Author
|
Ah, there's another case I missed. Will fix that up EDIT: fixed and squashed into the single commit |
042d655 to
ebdd028
Compare
uranusjr
reviewed
Jun 24, 2024
Comment on lines
+1379
to
+1387
| # versions containing fix/backport from https://github.com/python/cpython/pull/113563 | ||
| # which changed the behavior of `urllib.parse.urlun{parse,split}` | ||
| has_new_urlun_behavior = ( | ||
| # https://github.com/python/cpython/commit/387ff96e95b9f8a8cc7e646523ba3175b1350669 | ||
| (sys.version_info[:2] == (3, 12) and sys.version_info >= (3, 12, 4)) | ||
| or | ||
| # https://github.com/python/cpython/commit/872000606271c52d989e53fe4cc9904343d81855 | ||
| (sys.version_info[:2] == (3, 13) and sys.version_info >= (3, 13, 0, "beta", 2)) | ||
| ) |
Member
There was a problem hiding this comment.
Instead of trying to check versions, would it be better if we just try to parse one URL to determine the version?
Contributor
Author
There was a problem hiding this comment.
Instead of trying to check versions, would it be better if we just try to parse one URL to determine the version?
Good idea, that will save us having to update these versions. Trying that with f9e5477
There was a behavioural change to `urllib.parse.urlunparse`[1] that affects some of our tests on Windows. With the understanding that the new behaviour is indeed desired, split up some tests relying on this behaviour depending on the version of Python. The sample URL used to check this behaviour was taken from a test in the upstream change (with the new behaviour this URL will round-trip parsing) [1] python/cpython#113563
f9e5477 to
16f0617
Compare
Member
|
Windows is not really my domain anymore, but I just wanted to say thank you for helping us unbreak CI. It's been 🔴 a lot in the past few months, and getting it to stay 🍏 has been a real chore, so thank you :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a behavioural change to
urllib.parse.urlunparse[1] thataffects some of our tests on Windows. With the understanding that the
new behaviour is indeed desired, split up some tests relying on this
behaviour depending on the version of Python.
The sample URL used to check this behaviour was taken from a test in the
upstream change (with the new behaviour this URL will round-trip
parsing)
[1] python/cpython#113563