[New-bugs-announce] [issue45546] Unable to pickle enum with nested frozen dataclass?

Eric Cousineau report at bugs.python.org
Wed Oct 20 19:12:50 EDT 2021


New submission from Eric Cousineau <eric.cousineau at tri.global>:

I seem cannot pickle enum values from an enum class w/ a nested frozen dataclass.

I can pickle a field from a normal class w/ a nested frozen dataclass, and I can pickle a field from an enum with a top-level frozen dataclass - perhaps it's some interplay with `__qualname__` and `enum.py`?.

See attached file for sample test.
I checked on 3.6.9, 3.9.7, and 3.10.0.

Looked around, couldn't easily find existing issue for this.

----------
components: Library (Lib)
files: enum_test.py
messages: 404539
nosy: Eric Cousineau
priority: normal
severity: normal
status: open
title: Unable to pickle enum with nested frozen dataclass?
type: behavior
versions: Python 3.10, Python 3.6, Python 3.9
Added file: https://bugs.python.org/file50378/enum_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45546>
_______________________________________


More information about the New-bugs-announce mailing list