Allow replacing path without replacing query or fragment#1421
Allow replacing path without replacing query or fragment#1421asvetlov merged 25 commits intoaio-libs:masterfrom
Conversation
CodSpeed Performance ReportMerging #1421 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1421 +/- ##
==========================================
+ Coverage 96.04% 96.11% +0.06%
==========================================
Files 31 31
Lines 5770 5871 +101
Branches 348 348
==========================================
+ Hits 5542 5643 +101
Misses 202 202
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
reframed this as a new feature since the current behavior doesn't change and its by design. All the functionality here is new. |
We also need to update the docs for with_path
|
One last thing, we also need to update the docs for https://yarl--1421.org.readthedocs.build/en/1421/api/#yarl.URL.with_path |
|
We also have |
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
We will also need to bump the version to 1.18.0.dev0 after merging this PR |
Technically, we can do it right now. |
asvetlov
left a comment
There was a problem hiding this comment.
Please update affected method signatures in docs to reflect added parameters.
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>

What do these changes do?
Add keep_query and keep_fragment arguments to with_path function to allow replacing path without replacing query or fragment
Are there changes in behavior for the user?
Yes, users can now replace the path in a URL without unintentionally modifying the query string or fragment by using the new arguments. Existing behavior remains unchanged unless the new arguments are explicitly used.
Related issue number
closes #111
Checklist