-
Notifications
You must be signed in to change notification settings - Fork 234
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
feat: add join
method to Url
class
#1378
base: main
Are you sure you want to change the base?
Conversation
- added support for URL path joining with optional trailing slashes and multiple arguments.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1378 +/- ##
==========================================
- Coverage 90.21% 89.24% -0.97%
==========================================
Files 106 112 +6
Lines 16339 17834 +1495
Branches 36 41 +5
==========================================
+ Hits 14740 15916 +1176
- Misses 1592 1898 +306
- Partials 7 20 +13
... and 50 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
CodSpeed Performance ReportMerging #1378 will not alter performanceComparing Summary
|
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.
Thanks for the PR! The signature looks fine, though I think the implementation can be simpler.
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 just needs test cases and then I would be happy to see this merged. Sorry for the long delay 😬
- Refactor URL join function for better handling of relative paths - Add tests for joining URLs with and without trailing slashes - Cover various edge cases in line with URL specification that the previous function would fail to handle
I've added tests and changed the implementation. Now, it only takes one argument instead of multiple.
|
Change Summary
This PR implements a feature based on pydantic/pydantic#9794 to join URL path into the base URL. It uses the
join
method from theurl
crate.Related issue number
fix pydantic/pydantic#9794
Checklist
pydantic-core
(except for expected changes)