This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: uuid.UUID objects can't be unpickled in older Python versions (<3.7)
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, taleinat
Priority: normal Keywords: patch

Created on 2018-09-10 12:16 by taleinat, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9133 merged taleinat, 2018-09-10 12:53
PR 14834 merged taleinat, 2019-07-18 08:20
Messages (4)
msg324919 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-09-10 12:16
This affects only 3.7, where the new SafeUUID enum was introduced.

This was fixed on the master branch (3.8) while implementing issue30977.

Fixing this should simply require defining similar __getstate__ and __setstate__ methods as in 3.8.
msg324927 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2018-09-10 15:47
New changeset d53f1cabe8837697df4acb70c9c6537461b5eeda by Tal Einat in branch '3.7':
[3.7] bpo-34621: fix uuid.UUID (un)pickling compatbility with older Python versions (<3.7) (GH-9133)
https://github.com/python/cpython/commit/d53f1cabe8837697df4acb70c9c6537461b5eeda
msg348997 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-08-04 19:26
New changeset a2ea9448c677706d6318eaa71101f08df7604eb9 by Tal Einat in branch '3.7':
[3.7] bpo-34621: backwards-compatible pickle UUID with is_safe=unknown (GH-14834)
https://github.com/python/cpython/commit/a2ea9448c677706d6318eaa71101f08df7604eb9
msg348999 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-08-04 19:30
Note that the original fix, in PR GH-9133, contained a bug: UUID objects with `is_safe` set to `SafeUUID.unknown` would cause an exception if unpickled with Python <3.7.

This was reported by Thomas Wiebe in a comment to a commit in that PR:
https://github.com/python/cpython/commit/d53f1cabe8837697df4acb70c9c6537461b5eeda#commitcomment-31396021

This is now fixed, see PR GH-14834.
History
Date User Action Args
2022-04-11 14:59:05adminsetgithub: 78802
2019-08-04 19:30:11taleinatsetmessages: + msg348999
2019-08-04 19:26:39taleinatsetmessages: + msg348997
2019-07-18 08:20:41taleinatsetpull_requests: + pull_request14625
2018-09-10 15:47:50taleinatsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-09-10 15:47:36taleinatsetmessages: + msg324927
2018-09-10 12:53:14taleinatsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8585
2018-09-10 12:16:57taleinatcreate