Issue 34621: uuid.UUID objects can't be unpickled in older Python versions (<3.7) (original) (raw)
Issue34621
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.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/78802
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) * ![]() |
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 . Fixing this should simply require defining similar __getstate__ and __setstate__ methods as in 3.8. | ||
msg324927 - (view) | Author: Tal Einat (taleinat) * ![]() |
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) * ![]() |
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) * ![]() |
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:05 | admin | set | github: 78802 |
2019-08-04 19:30:11 | taleinat | set | messages: + |
2019-08-04 19:26:39 | taleinat | set | messages: + |
2019-07-18 08:20:41 | taleinat | set | pull_requests: + <pull%5Frequest14625> |
2018-09-10 15:47:50 | taleinat | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2018-09-10 15:47:36 | taleinat | set | messages: + |
2018-09-10 12:53:14 | taleinat | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest8585> |
2018-09-10 12:16:57 | taleinat | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements