[issue9632] Remove sys.setfilesystemencoding()

2010-09-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: I didn't proposed to add a new parameter to Py_InitializeEx() (which means create a new function to not break the API), I just wrote that

[issue9632] Remove sys.setfilesystemencoding()

2010-09-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I didn't proposed to add a new parameter to Py_InitializeEx() (which means create a new function to not break the API), I just wrote that _Py_SetFileSystemEncoding() doesn't work for your use case. If you embed Python into

[issue9632] Remove sys.setfilesystemencoding()

2010-09-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: keep the C function Hum, currently, Python3 only has a *private* function called _Py_SetFileSystemEncoding() which can only be called after

[issue9632] Remove sys.setfilesystemencoding()

2010-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: About embedded Python interpreters or py2exe-style applications: do you mean that the application calls a C function to set the encoding before starting the interpreter? Or you mean the Python function, sys.setfilesystemencoding()?

[issue9632] Remove sys.setfilesystemencoding()

2010-09-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: keep the C function Hum, currently, Python3 only has a *private* function called _Py_SetFileSystemEncoding() which can only be called after _Py_InitializeEx() (because it relies on the codecs API). If you consider that there is a

[issue9632] Remove sys.setfilesystemencoding()

2010-09-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: In such environments you cannot expect the user to configure the system properly (i.e. set an environment variable). Why would it be different for embeded python? Instead, the application has to provide an educated guess to

[issue9632] Remove sys.setfilesystemencoding()

2010-08-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Think of e.g. embedded Python interpreters or py2exe-style applications running on Linux or other systems that don't use Unicode APIs for FS-interaction or have fixed FS-encodings. What is the problem here? Python does guess the

[issue9632] Remove sys.setfilesystemencoding()

2010-08-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Think of e.g. embedded Python interpreters or py2exe-style applications running on Linux or other systems that don't use Unicode APIs for FS-interaction or have

[issue9632] Remove sys.setfilesystemencoding()

2010-08-26 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Think of e.g. embedded Python interpreters or py2exe-style applications running on Linux or other systems that don't use Unicode APIs for

[issue9632] Remove sys.setfilesystemencoding()

2010-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Think of e.g. embedded Python interpreters or py2exe-style applications running on Linux or other systems that don't use Unicode APIs for FS-interaction or have fixed FS-encodings. What is the problem here? Python does guess the

[issue9632] Remove sys.setfilesystemencoding()

2010-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: About the patch: it should patch Filenames and unicode section of Doc/whatsnew/3.2.rst (to explain that sys.setfilesystemencoding() is replaced by the PYTHONFSENCODING env var). -- ___

[issue9632] Remove sys.setfilesystemencoding()

2010-08-24 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9632 ___ ___ Python-bugs-list

[issue9632] Remove sys.setfilesystemencoding()

2010-08-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - patch review type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9632 ___

[issue9632] Remove sys.setfilesystemencoding()

2010-08-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New version of the patch: remove also _Py_SetFileSystemEncoding(). -- Added file: http://bugs.python.org/file18576/remove_sys_setfilesystemencoding-2.patch ___ Python tracker

[issue9632] Remove sys.setfilesystemencoding()

2010-08-19 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file18565/remove_sys_setfilesystemencoding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9632 ___

[issue9632] Remove sys.setfilesystemencoding()

2010-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: While you're right that adjusting the FS encoding long after Python has already started is probably not such a good idea, I do think that we need to provide a way to set the FS encoding from within Python without having to rely on external

[issue9632] Remove sys.setfilesystemencoding()

2010-08-18 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: sys.setfilesystemencoding() function is dangerous because it introduces a lot of inconsistencies: this function is unable to reencode all filenames in all objects (eg. Python is unable to find filenames in user objects or 3rd

[issue9632] Remove sys.setfilesystemencoding()

2010-08-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- keywords: +patch nosy: +Arfrever, lemburg, pitrou Added file: http://bugs.python.org/file18565/remove_sys_setfilesystemencoding.patch ___ Python tracker rep...@bugs.python.org