aio-libs / aio-libs/aiohttp

Partitioned cookies on Python <3.14

Đang mở
#10,380 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
16.5k
Fork
2.4k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
212

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.