Bug 1316629 - RIPEMD160 removed from hashlib in python 2.7.5-34.el7
Summary: RIPEMD160 removed from hashlib in python 2.7.5-34.el7
Keywords:
Status: CLOSED DUPLICATE of bug 1295459
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 16:07 UTC by Tom O'Connor
Modified: 2016-09-05 08:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-10 16:31:33 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Tom O'Connor 2016-03-10 16:07:42 UTC
Description of problem:

The RIPEMD160 hash is no longer available in python 2.7.5-34.el7.  Trying to create an instance results in a ValueError: unsupported hash type.  The previous release of python for EL7, python 2.7.5-16.el7, successfully created an instance of RIPEMD160.

Version-Release number of selected component (if applicable):

python 2.7.5-34.el7

How reproducible:

Always with 2.7.5-34.el7.


Steps to Reproduce:
1. Run python
2. import hashlib
3. r = hashlib.new('ripemd160')

Actual results:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/hashlib.py", line 111, in __hash_new
    return _hashlib.new(name, string, usedforsecurity)
ValueError: unsupported hash type

Expected results:

In prior release of python package, the same statements do not cause a ValueError exception, and the "r" variable is a usable instance of the RIPEMD160 hash.

Additional info:

Comment 2 Charalampos Stratakis 2016-03-10 16:31:33 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 1295459 ***

Comment 3 Kiltro 2016-09-02 21:13:07 UTC
I have the same problem and bug 1295459 does not apply for me:

Traceback (most recent call last):
  File "keys.py", line 18, in <module>
    ripemd160 = hashlib.new('ripemd160')
  File "build/bdist.linux-x86_64/egg/hashlib.py", line 87, in __py_new
    elif name in ('SHA512', 'sha512', 'SHA384', 'sha384'):
  File "build/bdist.linux-x86_64/egg/hashlib.py", line 80, in __get_builtin_constructor
    elif name in ('SHA256', 'sha256', 'SHA224', 'sha224'):
ValueError: unsupported hash type

Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2


No solution on the entire web, you will be a hero.

Thanks!

Comment 4 Petr Viktorin 2016-09-05 08:12:08 UTC
Harris, could you check the patch in bug #1295459 fixes this?

Comment 5 Charalampos Stratakis 2016-09-05 08:53:41 UTC
(In reply to Petr Viktorin from comment #4)
> Harris, could you check the patch in bug #1295459 fixes this?

(In reply to Kiltro from comment #3)
> I have the same problem and bug 1295459 does not apply for me:

I just verified the reproducer and the patch does fix the issue.


Note You need to log in before you can comment on or make changes to this bug.