-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Correct square bracket handling in URL netloc #882
Conversation
Note that the issues raised by #876 are not really visible in the current test suite. If #881 lands first, then this PR should will clear the test errors shown there, or we could wait for Github to roll out Python 3.11.4, at which point the test suite will start to fail too unless this PR is merged. 😄 |
Codecov Report
@@ Coverage Diff @@
## master #882 +/- ##
=======================================
Coverage 99.74% 99.74%
=======================================
Files 4 4
Lines 772 772
Branches 219 219
=======================================
Hits 770 770
Misses 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
8c4fc26
to
96a1c98
Compare
#881 has been merged and this PR has been rebased; all tests now pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an opinion on this but it's probably fine, except for that typo.
Talking about releases, I'm working on a PEP 517-driven packaging remake, hopefully will finish it today.. |
- The human representation of usernames and passwords should percent- encode square brackets. - Clean up the test suite to remove tests that use invalid hostnames (square brackets in a host name must only be used for IPv6 addresses). - Rename the remaining test using IPvFuture address syntax to make this explicit. - Drop a test for IPv6 addresses with a zone id; zone id support is controversial and expilictly excluded from the WHATWG URL standard. Zone ids *without percent characters in their name* continue to work as long as urllib.parse.urlsplit() accepts them but this is not something that yarl.URL() needs to support explicitly.
96a1c98
to
5c977b5
Compare
@mjpieters this is how I feel this should be supported FYI: #998 |
urllib.parse.urlsplit()
accepts them but this is not something that yarl.URL() needs to support explicitly.Fixes #876