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

Partitioned cookies on Python <3.14 #10380

Open
Dreamsorcerer opened this issue Feb 4, 2025 · 0 comments
Open

Partitioned cookies on Python <3.14 #10380

Dreamsorcerer opened this issue Feb 4, 2025 · 0 comments

Comments

@Dreamsorcerer
Copy link
Member

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:

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.

@Dreamsorcerer Dreamsorcerer pinned this issue Feb 4, 2025
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

No branches or pull requests

1 participant