aio-libs / aio-libs/aiohttp

Partitioned cookies on Python <3.14

Open
#10,380 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.5k
Forks
2.4k
Avg merge
17h 22m
Merged PRs (30d)
212

Description

In aiohttp 3.12 we'll have support for partitioned cookies, but this is dependent on upstream support in Python 3.14+.

If anyone needs support in an older release of Python, it can be monkey patched with this code:
```python
if sys.version_info < (3, 14):
from http import cookies

# See: https://github.com/python/cpython/issues/112713
cookies.Morsel._reserved["partitioned"] = "partitioned"
cookies.Morsel._flags.add("partitioned")
```

I'll leave this as a pinned issue for a couple of years until the feature is more widely available without monkey patching.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.