-
-
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
Fix to URL.with_port() input filtering #793
Conversation
…d corresponding test file as well.
Codecov Report
@@ Coverage Diff @@
## master #793 +/- ##
==========================================
+ Coverage 99.46% 99.73% +0.26%
==========================================
Files 4 4
Lines 750 753 +3
Branches 167 210 +43
==========================================
+ Hits 746 751 +5
+ Misses 3 2 -1
+ Partials 1 0 -1
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 |
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.
LGTM
What do these changes do?
These changes fix the improper validation issues with URL.with_port(). Essentially, it restricts ports to be from 0 to 65535 (tcp limit), and fixes the weird handling of the 0 port
Are there changes in behavior for the user?
The URL.with_port() function will now throw errors when Booleans or invalid ports are arguments.
Related issue number
#746
Implementation Inquiry
Currently, this is set up to allow port 0 to function and not throw errors. From what I looked up it seems to be possible to use the 0 port (officially it does "not exist"), though since it's a special case and issue #746 says that the output should throw an error, I'm unsure if I'm handling it correctly.
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.