remove old undocumented compat interfaces in hashlib and pwd #5881

This commit is contained in:
Benjamin Peterson 2009-05-04 22:25:21 +00:00
parent ec75312eaa
commit e04b627a11
5 changed files with 6 additions and 16 deletions

View file

@ -176,6 +176,9 @@ Library
Extension Modules Extension Modules
----------------- -----------------
- Issue #5881: Remove old undocumented compatibility interfaces in hashlib and
pwd.
- Issue #5463: In struct module, remove deprecated float coercion - Issue #5463: In struct module, remove deprecated float coercion
for integer type codes: struct.pack('L', 0.3) should now raise for integer type codes: struct.pack('L', 0.3) should now raise
an error. The _PY_STRUCT_FLOAT_COERCE constant has been removed. an error. The _PY_STRUCT_FLOAT_COERCE constant has been removed.

View file

@ -281,12 +281,6 @@ static PyGetSetDef EVP_getseters[] = {
(getter)EVP_get_block_size, NULL, (getter)EVP_get_block_size, NULL,
NULL, 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 */ {NULL} /* Sentinel */
}; };

View file

@ -203,13 +203,12 @@ PyInit_pwd(void)
if (m == NULL) if (m == NULL)
return NULL; return NULL;
if (!initialized) if (!initialized) {
PyStructSequence_InitType(&StructPwdType, PyStructSequence_InitType(&StructPwdType,
&struct_pwd_type_desc); &struct_pwd_type_desc);
initialized = 1;
}
Py_INCREF((PyObject *) &StructPwdType); Py_INCREF((PyObject *) &StructPwdType);
PyModule_AddObject(m, "struct_passwd", (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; return m;
} }

View file

@ -533,9 +533,6 @@ static PyGetSetDef SHA_getseters[] = {
static PyMemberDef SHA_members[] = { static PyMemberDef SHA_members[] = {
{"digest_size", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, {"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 */ {NULL} /* Sentinel */
}; };

View file

@ -599,9 +599,6 @@ static PyGetSetDef SHA_getseters[] = {
static PyMemberDef SHA_members[] = { static PyMemberDef SHA_members[] = {
{"digest_size", T_INT, offsetof(SHAobject, digestsize), READONLY, NULL}, {"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 */ {NULL} /* Sentinel */
}; };