[New-bugs-announce] [issue6071] no longer possible to hash arrays
Jean-Paul Calderone
report at bugs.python.org
Wed May 20 19:17:15 CEST 2009
New submission from Jean-Paul Calderone <exarkun at divmod.com>:
It used to be possible to use hashlib with arrays; it no longer seems
possible.
exarkun at charm:~$ python -c '
import sys, hashlib, array
print sys.version_info
print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest()
'
(2, 5, 2, 'final', 0)
7037807198c22a7d2b0807371d763779a84fdfcf
exarkun at charm:~$ ~/Projects/python/trunk/python -c '
import sys, hashlib, array
print sys.version_info
print hashlib.sha1(array.array("b", [1, 2, 3])).hexdigest()
'
sys.version_info(major=2, minor=7, micro=0, releaselevel='alpha', serial=0)
Traceback (most recent call last):
File "<string>", line 4, in <module>
TypeError: object supporting the buffer API required
exarkun at charm:~$
----------
components: Library (Lib)
messages: 88122
nosy: exarkun
severity: normal
status: open
title: no longer possible to hash arrays
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6071>
_______________________________________
More information about the New-bugs-announce
mailing list