diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-04 22:25:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-04 22:25:21 (GMT) |
commit | e04b627a116b4fed8fd76f9376ef53592c49d183 (patch) | |
tree | d34fbf300c14d372370177e81d3e3cab48999d55 | |
parent | ec75312eaafd6535347378179c657fca9e021e0b (diff) | |
download | cpython-e04b627a116b4fed8fd76f9376ef53592c49d183.zip cpython-e04b627a116b4fed8fd76f9376ef53592c49d183.tar.gz cpython-e04b627a116b4fed8fd76f9376ef53592c49d183.tar.bz2 |
remove old undocumented compat interfaces in hashlib and pwd #5881
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/_hashopenssl.c | 6 | ||||
-rw-r--r-- | Modules/pwdmodule.c | 7 | ||||
-rw-r--r-- | Modules/sha256module.c | 3 | ||||
-rw-r--r-- | Modules/sha512module.c | 3 |
5 files changed, 6 insertions, 16 deletions
@@ -176,6 +176,9 @@ Library Extension Modules ----------------- +- Issue #5881: Remove old undocumented compatibility interfaces in hashlib and + pwd. + - Issue #5463: In struct module, remove deprecated float coercion for integer type codes: struct.pack('L', 0.3) should now raise an error. The _PY_STRUCT_FLOAT_COERCE constant has been removed. diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 0dae515..ae74394 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -281,12 +281,6 @@ static PyGetSetDef EVP_getseters[] = { (getter)EVP_get_block_size, NULL, NULL, NULL}, - /* the old md5 and sha modules support 'digest_size' as in PEP 247. - * the old sha module also supported 'digestsize'. ugh. */ - {"digestsize", - (getter)EVP_get_digest_size, NULL, - NULL, - NULL}, {NULL} /* Sentinel */ }; diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index cb99183..061a0a5 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -203,13 +203,12 @@ PyInit_pwd(void) if (m == NULL) return NULL; - if (!initialized) + if (!initialized) { PyStructSequence_InitType(&StructPwdType, &struct_pwd_type_desc); + initialized = 1; + } Py_INCREF((PyObject *) &StructPwdType); PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType); - /* And for b/w compatibility (this was defined by mistake): */ - PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType); - initialized = 1; return m; } diff --git a/Modules/sha256module.c b/Modules/sha256module.c index 7c9b58d..a9ac748 100644 --- a/Modules/sha256module.c +++ b/Modules/sha256module.c @@ -533,9 +533,6 @@ static PyGetSetDef SHA_getseters[] = { static PyMemberDef SHA_members[] = { {"digest_size", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, - /* the old md5 and sha modules support 'digest_size' as in PEP 247. - * the old sha module also supported 'digestsize'. ugh. */ - {"digestsize", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, {NULL} /* Sentinel */ }; diff --git a/Modules/sha512module.c b/Modules/sha512module.c index 387187f..e29ddec 100644 --- a/Modules/sha512module.c +++ b/Modules/sha512module.c @@ -599,9 +599,6 @@ static PyGetSetDef SHA_getseters[] = { static PyMemberDef SHA_members[] = { {"digest_size", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, - /* the old md5 and sha modules support 'digest_size' as in PEP 247. - * the old sha module also supported 'digestsize'. ugh. */ - {"digestsize", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, {NULL} /* Sentinel */ }; |