From fce7fd6426519a2897330c03da7eb889232bf681 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 1 Sep 2010 18:54:56 +0000 Subject: 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). --- Python/sysmodule.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 013f5f1a9b..90c165a495 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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, -- cgit v1.2.1