[issue11771] hashlib object cannot be pickled
STINNER Victor
report at bugs.python.org
Tue Apr 5 13:49:42 CEST 2011
New submission from STINNER Victor <victor.stinner at haypocalc.com>:
$ ./python
Python 3.3a0 (default:76ed6a061ebe, Apr 5 2011, 12:25:00)
>>> import hashlib, pickle
>>> hash=hashlib.new('md5')
>>> pickle.dumps(hash)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class '_hashlib.HASH'>: attribute lookup _hashlib.HASH failed
The problem is that _hashlib.HASH is not accessible at Python level. There is a C define to make it accessible, but it is disabled by default: "#if HASH_OBJ_CONSTRUCTOR". This test is as old as the _hashlib module (#1121611, 624918e1c1b2).
----------
components: Library (Lib)
messages: 133021
nosy: haypo
priority: normal
severity: normal
status: open
title: hashlib object cannot be pickled
versions: Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11771>
_______________________________________
More information about the Python-bugs-list
mailing list