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 #7821/366ba40f backport][3.9] Only check origin if insecure scheme and there are origins to treat as secure, in CookieJar.filter_cookies() #7825

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Nov 12, 2023

This is a backport of PR #7821 as merged into master (366ba40).

What do these changes do?

Only check origin if insecure scheme and there are origins to treat as secure, in CookieJar.filter_cookies().

The change was made because yarl.URL.origin() is expensive. Should avoid calling it unconditionally.

Are there changes in behavior for the user?

No.

Related issue number

#7583
#7819 (comment)

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .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.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

…s secure, in CookieJar.filter_cookies() (#7821)

(cherry picked from commit 366ba40)
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

❗ No coverage uploaded for pull request base (3.9@9d498ca). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             3.9    #7825   +/-   ##
======================================
  Coverage       ?   97.36%           
======================================
  Files          ?      107           
  Lines          ?    32331           
  Branches       ?     3829           
======================================
  Hits           ?    31478           
  Misses         ?      649           
  Partials       ?      204           
Flag Coverage Δ
CI-GHA 97.27% <0.00%> (?)
OS-Linux 96.96% <0.00%> (?)
OS-Windows 94.50% <0.00%> (?)
OS-macOS 96.63% <0.00%> (?)
Py-3.10.11 94.41% <0.00%> (?)
Py-3.10.13 96.79% <0.00%> (?)
Py-3.11.6 96.46% <0.00%> (?)
Py-3.12.0 96.51% <0.00%> (?)
Py-3.8.10 94.38% <0.00%> (?)
Py-3.8.18 96.72% <0.00%> (?)
Py-3.9.13 94.39% <0.00%> (?)
Py-3.9.18 96.77% <0.00%> (?)
Py-pypy7.3.13 96.22% <0.00%> (?)
VM-macos 96.63% <0.00%> (?)
VM-ubuntu 96.96% <0.00%> (?)
VM-windows 94.50% <0.00%> (?)

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

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@Dreamsorcerer Dreamsorcerer merged commit c0f9017 into 3.9 Nov 12, 2023
27 of 31 checks passed
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/366ba40f737b811e6ac2e63bb40c347fa4fafcef/pr-7821 branch November 12, 2023 21:10
xiangxli pushed a commit to xiangxli/aiohttp that referenced this pull request Dec 4, 2023
…re scheme and there are origins to treat as secure, in CookieJar.filter_cookies() (aio-libs#7825)

**This is a backport of PR aio-libs#7821 as merged into master
(366ba40).**

Co-authored-by: Rongrong <i@rong.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants