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

Use quote_cookie setting from ClientSession's cookiejar in tmp_cookie_jar #10093

Merged
merged 10 commits into from
Dec 17, 2024

Conversation

Cycloctane
Copy link
Member

What do these changes do?

Reuse quote_cookie setting from ClientSession's cookiejar when creating temporary CookieJar in request method.

Are there changes in behavior for the user?

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

This pr add a new property method to the abstract class of client's CookieJar.

Related issue number

Fixes #9336

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

  • Add a new news fragment into the CHANGES/ folder

    Use the past tense or the present tense a non-imperative mood,
    referring to what's changed compared to the last released version
    of this project.

@Dreamsorcerer Dreamsorcerer added backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot labels Dec 2, 2024
Copy link

codspeed-hq bot commented Dec 2, 2024

CodSpeed Performance Report

Merging #10093 will not alter performance

Comparing Cycloctane:fix_quote_cookie (1d1b5d4) with master (dbd77ad)

Summary

✅ 47 untouched benchmarks

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.75%. Comparing base (dbd77ad) to head (1d1b5d4).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10093   +/-   ##
=======================================
  Coverage   98.74%   98.75%           
=======================================
  Files         122      122           
  Lines       36956    36965    +9     
  Branches     4411     4415    +4     
=======================================
+ Hits        36494    36503    +9     
  Misses        315      315           
  Partials      147      147           
Flag Coverage Δ
CI-GHA 98.63% <100.00%> (+<0.01%) ⬆️
OS-Linux 98.32% <100.00%> (+<0.01%) ⬆️
OS-Windows 96.17% <100.00%> (+<0.01%) ⬆️
OS-macOS 97.43% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 97.27% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 97.81% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 97.85% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 97.32% <100.00%> (-0.02%) ⬇️
Py-3.12.7 98.37% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 97.18% <100.00%> (-0.01%) ⬇️
Py-3.13.1 98.34% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 97.19% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 97.73% <100.00%> (-0.05%) ⬇️
Py-pypy7.3.16 97.34% <100.00%> (+<0.01%) ⬆️
VM-macos 97.43% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 98.32% <100.00%> (+<0.01%) ⬆️
VM-windows 96.17% <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.

@Cycloctane Cycloctane requested a review from webknjaz as a code owner December 2, 2024 15:17
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Dec 2, 2024
@bdraco
Copy link
Member

bdraco commented Dec 5, 2024

Doing a release shortly. Drafting while #10093 (comment) is being worked out.

@bdraco bdraco marked this pull request as draft December 5, 2024 18:48
@Dreamsorcerer
Copy link
Member

Seems to be coverage of web_response.py:268 being lost by this change. Do we need to remove that check, or adjust a test..?

@Dreamsorcerer
Copy link
Member

Nevermind, probably a confusion with being out of sync with master, it's gone now. This is probably ready then.

@Dreamsorcerer Dreamsorcerer marked this pull request as ready for review December 7, 2024 00:18
@bdraco
Copy link
Member

bdraco commented Dec 17, 2024

Screenshot 2024-12-17 at 8 18 22 AM

@bdraco bdraco merged commit 7b5d54a into aio-libs:master Dec 17, 2024
40 checks passed
Copy link
Contributor

patchback bot commented Dec 17, 2024

Backport to 3.11: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 7b5d54a on top of patchback/backports/3.11/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093

Backporting merged PR #10093 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.11/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093 upstream/3.11
  4. Now, cherry-pick PR Use quote_cookie setting from ClientSession's cookiejar in tmp_cookie_jar #10093 contents into that branch:
    $ git cherry-pick -x 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f
    If it'll yell at you with something like fatal: Commit 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Use quote_cookie setting from ClientSession's cookiejar in tmp_cookie_jar #10093 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.11/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link
Contributor

patchback bot commented Dec 17, 2024

Backport to 3.12: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 7b5d54a on top of patchback/backports/3.12/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093

Backporting merged PR #10093 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.12/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093 upstream/3.12
  4. Now, cherry-pick PR Use quote_cookie setting from ClientSession's cookiejar in tmp_cookie_jar #10093 contents into that branch:
    $ git cherry-pick -x 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f
    If it'll yell at you with something like fatal: Commit 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Use quote_cookie setting from ClientSession's cookiejar in tmp_cookie_jar #10093 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.12/7b5d54a96c1dd1282e9a79f9fc8056c02ca91c6f/pr-10093
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bdraco pushed a commit that referenced this pull request Dec 17, 2024
…kie_jar` (#10093)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <git@sambull.org>
(cherry picked from commit 7b5d54a)
@bdraco
Copy link
Member

bdraco commented Dec 17, 2024

backport 3.11 #10175

bdraco pushed a commit that referenced this pull request Dec 17, 2024
…kie_jar` (#10093)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <git@sambull.org>
(cherry picked from commit 7b5d54a)
@bdraco
Copy link
Member

bdraco commented Dec 17, 2024

backport 3.12 #10176

bdraco added a commit that referenced this pull request Dec 17, 2024
…ientSession's cookiejar in `tmp_cookie_jar` (#10175)

Co-authored-by: pre-commit-ci[bot]
Co-authored-by: Sam Bull <git@sambull.org>
Co-authored-by: Cycloctane <Octane-vs@outlook.com>
bdraco added a commit that referenced this pull request Dec 17, 2024
…ientSession's cookiejar in `tmp_cookie_jar` (#10176)

Co-authored-by: pre-commit-ci[bot]
Co-authored-by: Sam Bull <git@sambull.org>
Co-authored-by: Cycloctane <Octane-vs@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot backport-3.12 Trigger automatic backporting to the 3.12 release branch by Patchback robot 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.

aiohttp ignoring cookie_jar quote_cookie parameter
4 participants