-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Correctly handle zero explicit_port #1413
Conversation
8b6aa54
to
82322dd
Compare
82322dd
to
8b183cb
Compare
CodSpeed Performance ReportMerging #1413 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1413 +/- ##
=======================================
Coverage 96.06% 96.06%
=======================================
Files 31 31
Lines 5765 5772 +7
Branches 344 345 +1
=======================================
+ Hits 5538 5545 +7
Misses 201 201
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. |
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.
Looks good, thanks.
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!
What do these changes do?
This changes
URL.port
to return the explicit port instead of the default port when the explicit port is zero (i.e. not-None
but falsy).Are there changes in behavior for the user?
The
URL.port
attribute is supposed to give the port part of the URL with a scheme-based fallback, but it incorrectly used the fallback value when the given value was zero. This fixes the bug, returning the given value even when it is zero.Related issue number
Fixes #1408
Checklist