Skip to content

Commit 81d06a0

Browse files
YuvalElbar6claude
andcommitted
Fix partitioned cookie handling in load_json()
Add "partitioned" to the boolean attribute check in load_json() so it is restored as True (bool) rather than "true" (string) on Python 3.14+ where Morsel._reserved includes partitioned. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 2c899ef commit 81d06a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

aiohttp/cookiejar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def load_json(self, file_path: PathLike) -> None:
247247
"coded_value",
248248
):
249249
attr_val = morsel_data[attr]
250-
if attr in ("secure", "httponly"):
250+
if attr in ("secure", "httponly", "partitioned"):
251251
morsel[attr] = True if attr_val == "true" else attr_val # type: ignore[assignment]
252252
else:
253253
morsel[attr] = attr_val

0 commit comments

Comments
 (0)