Mercurial > cpython-lru_cache-weakref
annotate Lib/sha.py @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | a11b4885b445 |
| children |
| rev | line source |
|---|---|
|
35375
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
1 # $Id$ |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
2 # |
|
43298
a11b4885b445
email address update
Gregory P. Smith <greg@mad-scientist.com>
parents:
41924
diff
changeset
|
3 # Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) |
|
35375
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
4 # Licensed to PSF under a Contributor Agreement. |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
5 |
|
41924
b380c9c49738
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents:
35375
diff
changeset
|
6 import warnings |
|
b380c9c49738
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents:
35375
diff
changeset
|
7 warnings.warn("the sha module is deprecated; use the hashlib module instead", |
|
b380c9c49738
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents:
35375
diff
changeset
|
8 DeprecationWarning, 2) |
|
b380c9c49738
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents:
35375
diff
changeset
|
9 |
|
35375
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
10 from hashlib import sha1 as sha |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
11 new = sha |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
12 |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
13 blocksize = 1 # legacy value (wrong in any useful sense) |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
14 digest_size = 20 |
|
624918e1c1b2
[ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff
changeset
|
15 digestsize = 20 |
