Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)

2005-07-16 Thread Neil Hodgson
Martin v. Löwis:

> - But then, the wide API gives all results as Unicode. If you want to
>   promote only those entries that need it, it really means that you
>   only want to "demote" those that don't need it. But how can you tell
>   whether an entry needs it? There is no API to find out.

   I wrote a patch for os.listdir at
http://www.scintilla.org/difft.txt that uses WideCharToMultiByte to
check if a wide name can be represented in a particular code page and
only uses that representation if it fits. This is good for Windows
code pages including ASCII and "mbcs" but since Python's
sys.getdefaultencoding() can be something that has no code page
equivalent, it would have to try converting using strict mode and
interpret failure as leaving the name as unicode.

>   You could declare that anything with characters >128 needs it,
>   but that would be an incompatible change: If a character >128 in
>   the system code page is in a file name, listdir currently returns
>   it in the system code page. It then would return a Unicode string.

   I now quite like returning unicode for anything non-ASCII on
Windows as there is no ambiguity in what the result means and there
will be no need to change all the system calls to translate from the
default encoding. It is a change to the API which can lead to code
breaking but it should break with an exception. Assuming that byte
string arguments are using Python's default encoding looks more
dangerous with a behavioural change but no notification.

   Neil
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [C++-sig] GCC version compatibility

2005-07-16 Thread Christoph Ludwig
On Sun, Jul 10, 2005 at 07:41:06PM +0200, "Martin v. Löwis" wrote:
> Christoph Ludwig wrote:
> > My point is: The test implemented in the 2.4.1 configure script gives a 
> > wrong
> > result if your platform happens to be x86 Linux with ELF binaries and 
> > g++ 4.0. 
[...]
> > But I digress. It's not that important for our discussion whether a C++
> > compiler must / should / is allowed to add exception handling code to the
> > call of an extern "C" function. The point is that some do *unless* they see
> > the function definition. I contend the test involving two TUs matches more
> > closely the situation with ccpython.cc than the current test.
> 
> Maybe. For Python 2.4, feel free to contribute a more complex test. For
> Python 2.5, I would prefer if the entire code around ccpython.cc was
> removed.

I submitted patch #1239112 that implements the test involving two TUs for
Python 2.4. I plan to work on a more comprehensive patch for Python 2.5 but
that will take some time.

Regards

Christoph
-- 
http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html
LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Some RFE for review

2005-07-16 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote:
> Hi,
> 
> while bugs and patches are sometimes tricky to close, RFE can be very easy
> to decide whether to implement in the first place. So what about working a
> bit on this front? Here are several RFE reviewed, perhaps some can be
> closed ("should" is always from submitter's point of view):

Aren't there opinions to the RFE other than the "path module" one?

Reinhold

-- 
Mail address is perfectly valid!

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [C++-sig] GCC version compatibility

2005-07-16 Thread David Abrahams
Christoph Ludwig <[EMAIL PROTECTED]> writes:

> I submitted patch #1239112 that implements the test involving two TUs for
> Python 2.4. I plan to work on a more comprehensive patch for Python 2.5 but
> that will take some time.

Thanks very much for your efforts, Christoph!

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [C++-sig] GCC version compatibility

2005-07-16 Thread Anthony Baxter
On Saturday 16 July 2005 20:13, Christoph Ludwig wrote:
> I submitted patch #1239112 that implements the test involving two TUs for
> Python 2.4. I plan to work on a more comprehensive patch for Python 2.5 but
> that will take some time.

I'm only vaguely aware of all of the issues here with linking, but if this
is to be considered for 2.4.2, it needs to be low risk of breaking anything.
2.4.2 is a bugfix release, and I'd hate to have this break other systems that 
work...

Anthony
-- 
Anthony Baxter <[EMAIL PROTECTED]>
It's never too late to have a happy childhood.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com