Skip to content

Conversation

Cycloctane
Copy link
Member

What do these changes do?

Only set partitioned flag if it is supported by http.cookie (in python >= 3.14 or monkey-patched). Fix issue where saved cookiejars fail to be unpickled due to unsupported attribute. (At least clients without partitioned cookies supports can load cookiejars created by themselves.)

Are there changes in behavior for the user?

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

Related issue number

Fixes #11523

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

@bdraco bdraco added the backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot label Sep 20, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 20, 2025
Copy link

codecov bot commented Sep 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.68%. Comparing base (a9f248a) to head (d55987c).
⚠️ Report is 5 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11529      +/-   ##
==========================================
+ Coverage   97.67%   98.68%   +1.01%     
==========================================
  Files         127      127              
  Lines       43354    43371      +17     
  Branches     2325     2325              
==========================================
+ Hits        42345    42800     +455     
+ Misses        826      416     -410     
+ Partials      183      155      -28     
Flag Coverage Δ
CI-GHA 98.56% <100.00%> (+0.97%) ⬆️
OS-Linux 98.30% <100.00%> (+0.70%) ⬆️
OS-Windows 96.62% <100.00%> (?)
OS-macOS 97.50% <100.00%> (?)
Py-3.10.11 97.14% <100.00%> (?)
Py-3.10.18 97.64% <100.00%> (+0.61%) ⬆️
Py-3.11.13 97.83% <100.00%> (+0.61%) ⬆️
Py-3.11.9 97.34% <100.00%> (?)
Py-3.12.10 97.44% <100.00%> (?)
Py-3.12.11 97.94% <100.00%> (+0.62%) ⬆️
Py-3.13.7 98.20% <100.00%> (+0.87%) ⬆️
Py-3.9.13 97.03% <100.00%> (?)
Py-3.9.23 97.53% <100.00%> (?)
Py-pypy3.9.19-7.3.16 92.16% <100.00%> (?)
VM-macos 97.50% <100.00%> (?)
VM-ubuntu 98.30% <100.00%> (+0.70%) ⬆️
VM-windows 96.62% <100.00%> (?)

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.

Copy link

codspeed-hq bot commented Sep 20, 2025

CodSpeed Performance Report

Merging #11529 will not alter performance

Comparing Cycloctane:fix-cookies-attributes (d55987c) with master (230e1ee)

Summary

✅ 59 untouched

@Dreamsorcerer Dreamsorcerer merged commit 9a2f146 into aio-libs:master Sep 21, 2025
40 of 42 checks passed
Copy link
Contributor

patchback bot commented Sep 21, 2025

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

❌ Failed to cleanly apply 9a2f146 on top of patchback/backports/3.13/9a2f146a12e3525b43e96723ef41584bf9cf784e/pr-11529

Backporting merged PR #11529 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.13/9a2f146a12e3525b43e96723ef41584bf9cf784e/pr-11529 upstream/3.13
  4. Now, cherry-pick PR Ignore partitioned attributes in cookies if it is not supported by http.cookie #11529 contents into that branch:
    $ git cherry-pick -x 9a2f146a12e3525b43e96723ef41584bf9cf784e
    If it'll yell at you with something like fatal: Commit 9a2f146a12e3525b43e96723ef41584bf9cf784e is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 9a2f146a12e3525b43e96723ef41584bf9cf784e
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Ignore partitioned attributes in cookies if it is not supported by http.cookie #11529 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.13/9a2f146a12e3525b43e96723ef41584bf9cf784e/pr-11529
  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.

Cycloctane added a commit to Cycloctane/aiohttp that referenced this pull request Sep 21, 2025
Dreamsorcerer pushed a commit that referenced this pull request Sep 21, 2025
…ookies if it is not supported by http.cookie (#11530)

cherry-picked from commit 9a2f146
@Cycloctane Cycloctane deleted the fix-cookies-attributes branch October 19, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.13 Trigger automatic backporting to the 3.13 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.

Saved cookiejars with partitioned cookies are unable to be loaded in python <= 3.13

3 participants