-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Loading saved CookieJar breaks in 3.8.4 #7216
Comments
@Dreamsorcerer is this related to the PR you wanted released recently? |
There was a secondary PR in 3.8 which looked pretty safe, but I had no idea there was functionality for saving cookies to disk: Looks like the problem is that the expected keys changed from Should maybe add a test that loads a cookiejar from a premade dump, then we can get alerted when the pickle format changes. |
I think some migration code could look like this:
|
Fixes #7216 (well, stops it from happening accidentally again).
Coming here to alert that going from: |
See further discussion in #7221. |
Describe the bug
I save the contents of a CookieJar to persist a session. Loading a file saved in <3.8.4 will not work in aiohttp 3.8.4 as expected. When I'd iterate through the cookies the expiration update will raise an unhandled exception.
This issue completely breaks the authentication flow and bricks the session of a user in my application.
To Reproduce
Expected behavior
I expected the save/load to work across versions, but at least when upgrading to a newer version. The documentation does not mention anything to be afraid of either.
Logs/tracebacks
Python Version
Python 3.10.9
aiohttp Version
multidict Version
yarl Version
OS
Arch Linux
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: