Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()

are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
This commit is contained in:
Antoine Pitrou 2010-09-01 18:54:56 +00:00
parent b0fa831d1e
commit fce7fd6426
8 changed files with 4 additions and 90 deletions

View file

@ -182,24 +182,6 @@ Return the current default string encoding used by the Unicode \n\
implementation."
);
static PyObject *
sys_setdefaultencoding(PyObject *self, PyObject *args)
{
char *encoding;
if (!PyArg_ParseTuple(args, "s:setdefaultencoding", &encoding))
return NULL;
if (PyUnicode_SetDefaultEncoding(encoding))
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
PyDoc_STRVAR(setdefaultencoding_doc,
"setdefaultencoding(encoding)\n\
\n\
Set the current default string encoding used by the Unicode implementation."
);
static PyObject *
sys_getfilesystemencoding(PyObject *self)
{
@ -1030,8 +1012,6 @@ static PyMethodDef sys_methods[] = {
#ifdef USE_MALLOPT
{"mdebug", sys_mdebug, METH_VARARGS},
#endif
{"setdefaultencoding", sys_setdefaultencoding, METH_VARARGS,
setdefaultencoding_doc},
{"setfilesystemencoding", sys_setfilesystemencoding, METH_VARARGS,
setfilesystemencoding_doc},
{"setcheckinterval", sys_setcheckinterval, METH_VARARGS,