-
Notifications
You must be signed in to change notification settings - Fork 154
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
Raise TypeError
when a string is passed for port
to URL.build()
#959
Conversation
I did not include this in the PR - but the requirements file has a typo.
|
Fixed that in 85b53c9. 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.
Actually… I'm not sure if it's a good idea to accept empty strings at all. Should we error out instead, and aim for stricter public API input validation in general?
Yeah, it's typed as int. I'm not sure we should add code that explicitly supports something the type checker rejects (and supporting Line 61 in 85b53c9
|
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #959 +/- ##
==========================================
- Coverage 99.74% 99.33% -0.41%
==========================================
Files 4 17 +13
Lines 772 3317 +2545
Branches 219 325 +106
==========================================
+ Hits 770 3295 +2525
- Misses 2 22 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
@commonism looks like the PR title and description no longer correspond to its contents. This needs to be corrected. |
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
TypeError
when a string is passed for port
to URL.build()
What do these changes do?
Using port="" resulted in malformed urls, now using string for port raises TypeError
Are there changes in behavior for the user?
URL.build does not accept strings as port any longer.
URL.build does not create invalid urls when using "" as value for port.
Related issue number
fix #883
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.