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

Avoid trying to parse strings that cannot be IP Addresses #1104

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 4, 2024

What do these changes do?

Avoids trying to parse hosts as IP Address that could not be a possible IP Address according to https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2

Screenshot 2024-09-04 at 3 55 26 PM

Are there changes in behavior for the user?

performance improvement

Related issue number

fixes #1103

before
encode_host_slow_miss

after

encode_host_after_2

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 4, 2024
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.02%. Comparing base (bfef130) to head (c476cd3).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1104      +/-   ##
==========================================
+ Coverage   95.00%   95.02%   +0.01%     
==========================================
  Files          30       30              
  Lines        4448     4459      +11     
  Branches      391      392       +1     
==========================================
+ Hits         4226     4237      +11     
  Misses        196      196              
  Partials       26       26              
Flag Coverage Δ
CI-GHA 94.97% <100.00%> (+0.01%) ⬆️
MyPy 39.89% <59.09%> (-0.06%) ⬇️
OS-Linux 99.35% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.45% <100.00%> (+<0.01%) ⬆️
OS-macOS 99.04% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 98.93% <100.00%> (+<0.01%) ⬆️
Py-3.10.14 99.18% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 99.18% <100.00%> (+<0.01%) ⬆️
Py-3.12.5 99.18% <100.00%> (+<0.01%) ⬆️
Py-3.13.0-rc.1 99.18% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 98.87% <100.00%> (+<0.01%) ⬆️
Py-3.8.18 99.12% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 98.87% <100.00%> (+<0.01%) ⬆️
Py-3.9.19 99.12% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.11 99.18% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.18% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.17 99.21% <100.00%> (+<0.01%) ⬆️
VM-macos-latest 99.04% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.35% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.45% <100.00%> (+<0.01%) ⬆️
pytest 99.35% <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.

@bdraco bdraco marked this pull request as ready for review September 5, 2024 02:05
@bdraco bdraco merged commit 51541ec into master Sep 5, 2024
47 of 49 checks passed
@bdraco bdraco deleted the not_ip_quick_check branch September 5, 2024 02:06
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.

encode host is still slow for the cache miss case
1 participant