bpo-44676: Serialize the union type using only public API #27323
Conversation
Should we also remove |
Agreed. Lets remove it. Note: we can only remove it if we're backporting this to 3.10. Pickle docs says its confirmed to be backwards compatible. So if we don't backport this, we have to leave the private method in forever :(. Either that, or we can remove serialization from 3.10, I created a PR at GH-27335 for that. If Serhiy agrees to backporting this, we should probably consult the RM Pablo again. |
@@ -36,6 +36,12 @@ def pickle_complex(c): | |||
|
|||
pickle(complex, pickle_complex, complex) | |||
|
|||
def pickle_union(obj): |
Fidget-Spinner
Jul 24, 2021
Contributor
Off topic: I didn't know such a module existed
Copied over from GH-27244, by Yurii:
I agree with Yurii's reasoning here. +1 to backport this to 3.10 to remove Alternatively, we can remove the ability to pickle Union in 3.10 (see GH-27333). |
Oh, I did not know this feature was backported to 3.10. It makes sense to haste and backport this PR too. |
435a033
into
python:main
Thanks @serhiy-storchaka for the PR |
GH-27340 is a backport of this pull request to the 3.10 branch. |
https://bugs.python.org/issue44676