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 <rep...@bugs.python.org> <http://bugs.python.org/issue18742> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com