Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 64622:999d7d212f17
Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Fri, 10 Sep 2010 21:57:59 +0000 |
| parents | 944232521624 |
| children | 62c58dc912e8 |
line wrap: on
line diff
--- a/Python/sysmodule.c Fri Sep 10 21:51:44 2010 +0000 +++ b/Python/sysmodule.c Fri Sep 10 21:57:59 2010 +0000 @@ -199,25 +199,6 @@ ); static PyObject * -sys_setfilesystemencoding(PyObject *self, PyObject *args) -{ - PyObject *new_encoding; - if (!PyArg_ParseTuple(args, "U:setfilesystemencoding", &new_encoding)) - return NULL; - if (_Py_SetFileSystemEncoding(new_encoding)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -PyDoc_STRVAR(setfilesystemencoding_doc, -"setfilesystemencoding(string) -> None\n\ -\n\ -Set the encoding used to convert Unicode filenames in\n\ -operating system filenames." -); - -static PyObject * sys_intern(PyObject *self, PyObject *args) { PyObject *s; @@ -1012,8 +993,6 @@ #ifdef USE_MALLOPT {"mdebug", sys_mdebug, METH_VARARGS}, #endif - {"setfilesystemencoding", sys_setfilesystemencoding, METH_VARARGS, - setfilesystemencoding_doc}, {"setcheckinterval", sys_setcheckinterval, METH_VARARGS, setcheckinterval_doc}, {"getcheckinterval", sys_getcheckinterval, METH_NOARGS,
