Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions aiohttp/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
15 changes: 1 addition & 14 deletions docs/client_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading