-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
IP address test regressions (Python 3.11.4, 3.12.0b1) #876
Comments
I'll be tackling these as part of #881. Note that these regressions will also affect the next 3.11 release as these changes are part of a bug fix that also lands in the 3.11 branch. |
Actually, I'll not tackle this as part of #881, as this is not just a 3.12 regression. 3.11.4 was slated to be released yesterday, I'm assuming that the release is imminent, and then the same errors will start cropping up in the 3.11 tests. We'll need to validate each of the IP addresses that are now causing issues; e.g. the |
FWIW, the WHATWG URL specification intentionally omits IPv6 zone support, as these are host specific. I'm not saying we should outright reject IPv6 addresses with a zone scope identifier, but I don't think we need to go out of our way to make all possible scope labels work, either. |
Well, in case you are looking for my input, I'm afraid I can't help much. I'm merely in the role of a packager (for Gentoo) here, and I don't know anything about yarl, besides the fact that some other packages need it. |
Invalid testsOf the failing tests, the following look to be invalid to me:
IPv6 Zone ID strings in IPv6 addresses inside URLs
However, the zone id portion of this string is, at best, ambiguous, and at worst, just invalid. The zone id is either
(bold emphasis mine). This makes the
It is intentionally omitted because zone ids are local to the current machine, and because of the implementation-dependent nature of the id string. As a result, the WHATWG URL host parser description does not apply percent decoding to the (expected) IPv6 string found between square brackets.
Because the Python implementation follows WHATWG and doesn't apply percent decoding I am strongly inclined to just remove the test altogether. We don't have to explicitly raise an error if you have a zone ID identifier, but I'd rather not have to special case these either. At best we should remove the Note on
|
Not a problem! I'm just documenting my thoughts on this, to facilitate discussion and future reference when people come asking why their specific URL no longer is being accepted or why behaviour changed. |
https://build.opensuse.org/request/show/1096862 by user mcepl + favogt_factory - Add 882-sq_bracket_in_URL_netloc.patch fixing handling of square bracket handling in URL netloc (gh#aio-libs/yarl#876).
Describe the bug
When running the test suite under Python 3.12, a few tests fail:
(full traceback below)
To Reproduce
Run
python3.12 -m pytest
;-).Expected behavior
Passing tests ;-).
Logs/tracebacks
Python Version
multidict Version
yarl Version
OS
Gentoo Linux amd64
Additional context
Confirmed on 723a5ba.
Code of Conduct
The text was updated successfully, but these errors were encountered: