[New-bugs-announce] [issue18742] Abstract base class for hashlib

Christian Heimes report at bugs.python.org
Thu Aug 15 00:31:12 CEST 2013


New submission from Christian Heimes:

All hashlib types provide a common interfaces but there is no common super class. The patch implements provides hashlib.CryptoHash abstract base class as common virtual class for all hash types.

The patch also exposes all internal types of the internal hash C modules so I don't have to jump throw the type(constructor()) hoop.

I have also changed __get_builtin_constructor() to use a lookup cache instead of importing the module every time. It is necessary to avoid multiple calls to CryptoHash.register().

----------
files: hashlib_abc.patch
keywords: patch
messages: 195226
nosy: christian.heimes, gregory.p.smith
priority: normal
severity: normal
stage: patch review
status: open
title: Abstract base class for hashlib
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31295/hashlib_abc.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18742>
_______________________________________


More information about the New-bugs-announce mailing list