Skip to content
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

Remove fallback to getservbyname in _get_default_port #1076

Merged
merged 4 commits into from
Sep 1, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 1, 2024

What do these changes do?

Remove support RFC 3986 section-3.2.3 port normalization when the scheme is not one of http, https, wss, or ws.

Support for port normalization was recently added in #1033 and contained code that would do blocking I/O if the scheme was not one of the four listed above. The code has been removed because this library is intended to be safe for usage with asyncio.

Additional details can be found in issue #1075

Are there changes in behavior for the user?

RFC 3986 section 3.2.3 port normalization will only work for http, https, ws, and wss

Related issue number

fixes #1075

Checklist

Copy link

codecov bot commented Sep 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.01%. Comparing base (6339581) to head (674ae5a).
Report is 342 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1076      +/-   ##
==========================================
- Coverage   93.02%   93.01%   -0.01%     
==========================================
  Files          31       31              
  Lines        4415     4411       -4     
  Branches      376      374       -2     
==========================================
- Hits         4107     4103       -4     
  Misses        282      282              
  Partials       26       26              
Flag Coverage Δ
CI-GHA 92.97% <100.00%> (-0.01%) ⬇️
MyPy 26.34% <0.00%> (-0.08%) ⬇️
OS-Linux 99.22% <100.00%> (-0.01%) ⬇️
OS-Windows 99.44% <100.00%> (-0.01%) ⬇️
OS-macOS 98.90% <100.00%> (-0.01%) ⬇️
Py-3.10.11 98.82% <100.00%> (+0.02%) ⬆️
Py-3.10.14 99.07% <100.00%> (+0.02%) ⬆️
Py-3.11.9 99.07% <100.00%> (+0.02%) ⬆️
Py-3.12.5 99.07% <100.00%> (+0.02%) ⬆️
Py-3.13.0-rc.1 99.07% <100.00%> (+0.02%) ⬆️
Py-3.8.10 98.76% <100.00%> (-0.01%) ⬇️
Py-3.8.18 99.02% <100.00%> (-0.01%) ⬇️
Py-3.9.13 98.76% <100.00%> (-0.01%) ⬇️
Py-3.9.19 99.02% <100.00%> (-0.01%) ⬇️
Py-pypy7.3.11 99.19% <100.00%> (-0.01%) ⬇️
Py-pypy7.3.16 99.22% <100.00%> (-0.01%) ⬇️
VM-macos-latest 98.90% <100.00%> (-0.01%) ⬇️
VM-ubuntu-latest 99.22% <100.00%> (-0.01%) ⬇️
VM-windows-latest 99.44% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 1, 2024
@bdraco bdraco marked this pull request as ready for review September 1, 2024 07:36
@bdraco
Copy link
Member Author

bdraco commented Sep 1, 2024

Thanks

@bdraco bdraco merged commit 7c1220b into master Sep 1, 2024
45 of 48 checks passed
@bdraco bdraco deleted the remove_blocking_io branch September 1, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalize URL string ports per RFC 3986 section 3.2.3 #1033 introduced blocking I/O
3 participants