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 missing port in HttpUrl.build() result #3652
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
please review |
samuelcolvin
reviewed
Apr 2, 2022
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.
otherwise I think makes sense.
please update. |
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
Fixed, please check |
thanks so much. |
ntaylorwss
pushed a commit
to nicejobinc/pydantic
that referenced
this pull request
Jun 24, 2022
* Port number is no longer being ignored by HttpUrl.build() * Update tests/test_networks.py Co-authored-by: Samuel Colvin <samcolvin@gmail.com> * Update networks.py * Update tests/test_networks.py Co-authored-by: Samuel Colvin <samcolvin@gmail.com> * Update test_networks.py * Update test_networks.py * update change description Co-authored-by: Samuel Colvin <samcolvin@gmail.com> Co-authored-by: Samuel Colvin <s@muelcolvin.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Previously passing the
port
argument intoHttpUrl.build()
method has lead to including this port number to the output:But a regression was introduced in #2447.
It looks like the desired behavior was to hide default port number for the protocol, but instead any port number was just being ignored.
So I've fixed a check, that only default port numbers become hidden, like
80
forhttp
or443
tohttps
. Non-default port numbers are left unchanged.Also I've added a test to cover this case.
Related issue number
No
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)