Author satra
Recipients satra
Date 2018-12-16.03:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm not sure if this is intended behavior or an error. I'm creating dataclasses dynamically and trying to pickle those classes or objects containing instances of those classes. This was resulting in an error, so I trimmed it down to this example.

import pickle as pk
import dataclasses as dc

class A:
pk.dumps(A)  # --> this is fine

B = dc.make_dataclass('B', [], bases=(A,))
pk.dumps(B)  # --> results in an error

# PicklingError: Can't pickle <class 'types.B'>: attribute lookup B on types failed

is this expected behavior? and if so, is there a way to create a dynamic dataclass that pickles?
Date User Action Args
2018-12-16 03:22:21satrasetrecipients: + satra
2018-12-16 03:22:21satrasetmessageid: <>
2018-12-16 03:22:21satralinkissue35510 messages
2018-12-16 03:22:20satracreate