From 256b467939c27df81ff6f048b92d63e34d6d6386 Mon Sep 17 00:00:00 2001 From: Yuval E Date: Sat, 21 Feb 2026 10:00:53 +0200 Subject: [PATCH] Remove pickle references from docs and docstrings Follow-up to #12091. Remove mentions of pickle format from the CookieJar.load() docstring and the client_reference docs. Co-Authored-By: Claude Opus 4.6 --- aiohttp/cookiejar.py | 4 ---- docs/client_reference.rst | 15 +-------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py index 3ba7de6869b..9b49656d642 100644 --- a/aiohttp/cookiejar.py +++ b/aiohttp/cookiejar.py @@ -176,10 +176,6 @@ def save(self, file_path: PathLike) -> None: def load(self, file_path: PathLike) -> None: """Load cookies from a file. - Tries to load JSON format first. Falls back to loading legacy - pickle format (using a restricted unpickler) for backward - compatibility with existing cookie files. - :param file_path: Path to file from where cookies will be imported, :class:`str` or :class:`pathlib.Path` instance. """ diff --git a/docs/client_reference.rst b/docs/client_reference.rst index ddd561c7e60..efadd1c89f4 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -2476,25 +2476,12 @@ Utilities Write a JSON representation of cookies into the file at provided path. - .. versionchanged:: 3.14 - - Previously used pickle format. Now uses JSON for safe - serialization. - :param file_path: Path to file where cookies will be serialized, :class:`str` or :class:`pathlib.Path` instance. .. method:: load(file_path) - Load cookies from the file at provided path. Tries JSON format - first, then falls back to legacy pickle format (using a restricted - unpickler that only allows cookie-related types) for backward - compatibility with existing cookie files. - - .. versionchanged:: 3.14 - - Now loads JSON format by default. Falls back to restricted - pickle for files saved by older versions. + Load cookies from the file at provided path. :param file_path: Path to file from where cookies will be imported, :class:`str` or :class:`pathlib.Path` instance.