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
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
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
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()?
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
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
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
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
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
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
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).
--
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9632
___
___
Python-bugs-list
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
___
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
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
___
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
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
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
18 matches
Mail list logo