-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
SimpleCookie not unpicklable with protocol 2+ #66964
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
Comments
Expected: >>> import pickle
>>> from http.cookies import SimpleCookie
>>> pickle.loads(pickle.dumps(SimpleCookie('hi=there'),2))
<SimpleCookie: hi='there'>
# Actual
<SimpleCookie: hi='Set-Cookie: hi=there'> Patch is based on the suggestion from Georg Brandl in bpo-22758 (I added the "else" as the fix did not work without it). |
By the way, this is my first patch for Python and I submitted a CLA 2 days ago. |
Test pickling with all protocols (see bpo-22777), not only with HIGHEST_PROTOCOL. |
Updated patch to test pickling of all protocols. |
Updated patch per comments. |
LGTM. |
New changeset 7be6ef737aaf by Serhiy Storchaka in branch '3.4': New changeset caa8f9248ab8 by Serhiy Storchaka in branch 'default': |
Thank you for your contribution Tim. |
New changeset 515331e0ca0c by Serhiy Storchaka in branch '2.7': |
This affects 2.7 too. |
Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: