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

[PR #9366/43deadb2 backport][3.11] Small speed up to update_headers #9382

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Oct 1, 2024

This is a backport of PR #9366 as merged into master (43deadb).

What do these changes do?

  • Avoid checking to see if the port is default if no port is set: For most cases we can avoid the is_default_port check which has to work out the default port internally in yarl since if there is no explict port set, it must be the default port
  • Avoid using strip for a single char check

Event if we have to call is_default_port, explict_port will already be cached
Screenshot 2024-10-01 at 4 33 00 AM

Are there changes in behavior for the user?

no

Is it a substantial burden for the maintainers to support this?

no

@patchback patchback bot requested a review from asvetlov as a code owner October 1, 2024 16:59
@bdraco bdraco added the bot:chronographer:skip This PR does not need to include a change note label Oct 1, 2024
@bdraco bdraco enabled auto-merge (squash) October 1, 2024 16:59
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.80%. Comparing base (224345e) to head (ff141d1).
Report is 4 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11    #9382   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files         108      108           
  Lines       35051    35054    +3     
  Branches     4185     4186    +1     
=======================================
+ Hits        34280    34283    +3     
  Misses        574      574           
  Partials      197      197           
Flag Coverage Δ
CI-GHA 97.67% <100.00%> (+<0.01%) ⬆️
OS-Linux 97.36% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.85% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.06% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 96.92% <100.00%> (-0.01%) ⬇️
Py-3.10.15 96.86% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 96.93% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 97.00% <100.00%> (+<0.01%) ⬆️
Py-3.12.6 97.40% <100.00%> (+<0.01%) ⬆️
Py-3.13.0-rc.2 97.38% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 96.83% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 96.77% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 96.38% <100.00%> (+<0.01%) ⬆️
VM-macos 97.06% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 97.36% <100.00%> (+<0.01%) ⬆️
VM-windows 94.85% <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 merged commit 9c539c3 into 3.11 Oct 1, 2024
32 of 33 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/43deadb286df2a05de09d00121ed90811ca232a2/pr-9366 branch October 1, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant