Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Martin v. Löwis
I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Can you please elaborate what APIs you are talking about exactly? If it's the byte APIs (i.e. using bytes as file names), then I'm -1 on this proposal.

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Antoine Pitrou
On Tue, 25 Oct 2011 00:57:42 +0200 Victor Stinner victor.stin...@haypocalc.com wrote: Hi, I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Because this change is incompatible with Python 3.2, even if

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Victor Stinner
Le Mardi 25 Octobre 2011 13:20:12 vous avez écrit : Victor Stinner writes: I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. By bogus you mean sometimes (?) invalid and the OS will refuse to use

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Victor Stinner
Le Mardi 25 Octobre 2011 09:09:56 vous avez écrit : I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Can you please elaborate what APIs you are talking about exactly? Basically, all functions

Re: [Python-Dev] memcmp performance

2011-10-25 Thread Stefan Behnel
Richard Saunders, 25.10.2011 01:17: -On [20111024 09:22], Stefan Behnel wrote: I agree. Given that the analysis shows that the libc memcmp() is particularly fast on many Linux systems, it should be up to the Python package maintainers for these systems to set that option externally through

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Victor Stinner
Le Mardi 25 Octobre 2011 09:09:56 vous avez écrit : If it's the byte APIs (i.e. using bytes as file names), then I'm -1 on this proposal. People that explicitly use bytes for file names deserve to get whatever exact platform semantics the platform has to offer. This is true on Unix, and it is

Re: [Python-Dev] memcmp performance

2011-10-25 Thread Victor Stinner
Le Mardi 25 Octobre 2011 10:44:16 Stefan Behnel a écrit : Richard Saunders, 25.10.2011 01:17: -On [20111024 09:22], Stefan Behnel wrote: I agree. Given that the analysis shows that the libc memcmp() is particularly fast on many Linux systems, it should be up to the Python package

Re: [Python-Dev] [Python-checkins] cpython: #13251: update string description in datamodel.rst.

2011-10-25 Thread Petri Lehtinen
Hi, ezio.melotti wrote: http://hg.python.org/cpython/rev/11d18ebb2dd1 changeset: 73116:11d18ebb2dd1 user:Ezio Melotti ezio.melo...@gmail.com date:Tue Oct 25 09:23:42 2011 +0300 summary: #13251: update string description in datamodel.rst. files:

Re: [Python-Dev] [Python-checkins] cpython: Issue #13226: Add RTLD_xxx constants to the os module. These constants can by

2011-10-25 Thread Petri Lehtinen
Hi, victor.stinner wrote: http://hg.python.org/cpython/rev/c75427c0da06 changeset: 73127:c75427c0da06 user:Victor Stinner victor.stin...@haypocalc.com date:Tue Oct 25 13:34:04 2011 +0200 summary: Issue #13226: Add RTLD_xxx constants to the os module. These constants can

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Martin v. Löwis
My proposition is a fix to user reported by a user: http://bugs.python.org/issue13247 So your proposal is that abspath(b.) shall raise a UnicodeError in this case? Are you serious??? In practice, characters not encodable to the ANSI code page are very rare. For example: it's difficult to

Re: [Python-Dev] Modules of plat-* directories

2011-10-25 Thread Martin v. Löwis
Am 24.10.2011 14:06, schrieb Victor Stinner: There are open issues related to plat-XXX. Le Lundi 24 Octobre 2011 00:03:42 Martin v. Löwis a écrit : no, we make no changes to them unless a user actually requests a change Matthias Klose asked for socket SIO* constants in september 2006 (5

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Victor Stinner
Le mardi 25 octobre 2011 00:57:42, Victor Stinner a écrit : I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Because this change is incompatible with Python 3.2, even if such filenames are unusable and I

Re: [Python-Dev] [Python-checkins] cpython: Issue #13226: Add RTLD_xxx constants to the os module. These constants can by

2011-10-25 Thread Victor Stinner
Le mardi 25 octobre 2011 14:50:44, Petri Lehtinen a écrit : Hi, victor.stinner wrote: http://hg.python.org/cpython/rev/c75427c0da06 changeset: 73127:c75427c0da06 user:Victor Stinner victor.stin...@haypocalc.com date:Tue Oct 25 13:34:04 2011 +0200 summary:

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Terry Reedy
On 10/25/2011 4:31 AM, Victor Stinner wrote: Le Mardi 25 Octobre 2011 09:09:56 vous avez écrit : I propose to raise Unicode errors if a filename cannot be decoded on Windows, instead of creating a bogus filenames with questions marks. Can you please elaborate what APIs you are talking about

Re: [Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

2011-10-25 Thread Stephen J. Turnbull
In general I agree with what you write, Terry. One clarification and one comment, though. Terry Reedy writes: The doc says All functions accepting path or file names accept both bytes and string objects, and result in an object of the same type, if a path or file name is returned. It