-
-
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
RFC3986 compatible URL.join honoring empty segments #1039
Conversation
urllib.parse.urljoin does not honor empty segments, python/cpython#84774 implement using joinpath change query string generation to not emit empty values as ""
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1039 +/- ##
==========================================
+ Coverage 62.37% 62.60% +0.23%
==========================================
Files 38 38
Lines 6626 6721 +95
Branches 356 368 +12
==========================================
+ Hits 4133 4208 +75
- Misses 2466 2486 +20
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Towncrier ain't happy with my intersphinx link to python docs:
|
As
does not work either
But according to
this should work and the intersphinx is set up in the job
@Dreamsorcerer @webknjaz any ideas? |
@commonism use In my helper, I tried replacing them with proper reference hints: https://webknjaz.github.io/intersphinx-untangled |
Technically, it's not Towncrier that's unhappy. Towncrier is just a fancy template renderer. But when that's injected into Sphinx (through my |
The python domain maps function to func, therefore it is :py:func: To many docs for intersphinx show :py:function: as example. That said, mastered this as well. |
always encode parameters with an assignment adjust rfc3986 tests to include an assignment in the expectation
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 think this looks right to me. @webknjaz Can you check it over too?
Co-authored-by: Sam Bull <[email protected]>
Ran a profile. Only thing I noticed is |
Noticed this one comes up a lot while profiling #1039
Tested one production. No adverse effect observed |
Thanks @commonism |
#1039 introduced a regression in decoding query string params
This PR introduced a regression in decoding query string params in joined urls. I attempted to fix it in #1066 but the fix looks more involved so I'm going to revert this PR and do another release I think this needs to be reworked to use I would like to encourage another attempt at solving this problem. |
What do these changes do?
The changes re-implement URL.join within yarl.URL instead of using urllib.parse.urljoin to avoid known issues when joining paths with empty segments (python/cpython#84774)
Are there changes in behavior for the user?
Due to the unit tests for URL.join it was required to align the query parameter rendering to match the unit tests, empty parameters are rendered without value therefore instead of an empty value.
Related issue number
Checklist