Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
Closed
Description
Bug report
In [30]: import pickle, sre_constantsIn [31]: a = pickle.dumps(sre_constants.SUCCESS)In [32]: pickle.loads(a)---------------------------------------------------------------------------TypeError Traceback (most recent call last)<ipython-input-32-7038544c8e94> in <cell line: 1>()----> 1 pickle.loads(a)TypeError: __new__() missing 1 required positional argument: 'name'
Even if we decidesre_constants.*
are not picklable, theTypeError
should happen when trying to dump, not when trying to load. This could cause a user to write pickle files they can't ever read.
Your environment
- CPython versions tested on: 3.9, 3.10
- Operating system and architecture: Ubuntu 20.04 x86_64