Staging
v0.8.1
Revision 960b9b7a2f6e9b4f0e6b692d604c53b3fd2f5d1c authored by Jeffrey Yasskin on 28 February 2008, 04:45:36 UTC, committed by Jeffrey Yasskin on 28 February 2008, 04:45:36 UTC
which forbids constructing types that have it set. The effect is to speed

  ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()'

up from 2.5us to 0.201us. This fixes issue 1762.
1 parent c105289
Raw File
sha.py
# $Id$
#
#  Copyright (C) 2005   Gregory P. Smith (greg@krypto.org)
#  Licensed to PSF under a Contributor Agreement.

import warnings
warnings.warn("the sha module is deprecated; use the hashlib module instead",
                DeprecationWarning, 2)

from hashlib import sha1 as sha
new = sha

blocksize = 1        # legacy value (wrong in any useful sense)
digest_size = 20
digestsize = 20
back to top