diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-10 21:57:59 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-10 21:57:59 +0000 |
commit | 1658cfd89d09782b7499d0e4a0daa56d5ed6b5b6 (patch) | |
tree | e2ec454373f97e4eaef5ecf064786cc43e6eb86c /Python/sysmodule.c | |
parent | ba1a29639db0d619e8df52c246365918ee5f0da5 (diff) | |
download | cpython-1658cfd89d09782b7499d0e4a0daa56d5ed6b5b6.tar.gz |
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.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 90c165a495..4e428f0171 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -199,25 +199,6 @@ operating system filenames." ); 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 @@ static PyMethodDef sys_methods[] = { #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, |