This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2011-04-05.11:49:41
SpamBayes Score 4.8139023e-06
Marked as misclassified No
Message-id <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za>
In-reply-to
Content
$ ./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).
History
Date User Action Args
2011-04-05 11:49:42vstinnersetrecipients: + vstinner
2011-04-05 11:49:42vstinnersetmessageid: <1302004182.5.0.155912208324.issue11771@psf.upfronthosting.co.za>
2011-04-05 11:49:41vstinnerlinkissue11771 messages
2011-04-05 11:49:41vstinnercreate