[New-bugs-announce] [issue32721] test_hashlib fails if _md5 is not built

Benjamin Peterson report at bugs.python.org
Tue Jan 30 00:29:15 EST 2018


New submission from Benjamin Peterson <benjamin at python.org>:

$ make
$ rm build/lib.linux-x86_64-3.7/_md5.cpython-37m-x86_64-linux-gnu.so 
$ ./python -m test test_hashlib
Run tests sequentially
0:00:00 load avg: 1.11 [1/1] test_hashlib
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
/home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py:90: UserWarning: Did a C extension fail to compile? No module named '_md5'
  warnings.warn('Did a C extension fail to compile? %s' % error)
Warning -- logging._handlerList was modified by test_hashlib
  Before: (139817255081928, [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>], [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>])
  After:  (139817255081928, [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>], [<weakref at 0x7f29bdc02868; to '_StderrHandler' at 0x7f29bdbfeb70>, <weakref at 0x7f29ba4f71d8; to 'StreamHandler' at 0x7f29ba4ee8d0>]) 
test test_hashlib failed -- Traceback (most recent call last):
  File "/home/benjamin/dev/python/cpython/Lib/test/test_hashlib.py", line 209, in test_get_builtin_constructor
    constructor = get_builtin_constructor('md5')
  File "/home/benjamin/dev/python/cpython/Lib/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5

test_hashlib failed

1 test failed:
    test_hashlib

Total duration: 397 ms
Tests result: FAILURE

----------
components: Build
messages: 311233
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: test_hashlib fails if _md5 is not built
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32721>
_______________________________________


More information about the New-bugs-announce mailing list