Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:05:51 +0100, Paul Moore wrote: >> As for a bytes version of sys.argv and os.environ, you're welcome to >> propose a patch (this would be a separate issue on the aforementioned >> issue tracker). > > But please be aware that such a proposal would have to consider: > > 1. Th

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 11:41:11 +, Antoine Pitrou wrote: > Nobody nowhere.com> writes: >> >> This results in an internal error: >> >> > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") >> Traceback (most recent call last): >> File "", line 1, in >> SystemError: Objec

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:57:49 +0200, Hallvard B Furuseth wrote: >> Okay, that's useful, except that it may have some bugs: >> (...) >> Assuming that this gets fixed, it should make most of the problems with >> 3.0 solvable. OTOH, it wouldn't have killed them to have added e.g. >> sys.argv_bytes and

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Paul Moore
2009/6/29 Antoine Pitrou : > As for a bytes version of sys.argv and os.environ, you're welcome to propose a > patch (this would be a separate issue on the aforementioned issue tracker). But please be aware that such a proposal would have to consider: 1. That on Windows, the native form is the cha

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Hallvard B Furuseth
Nobody writes: >On Sun, 28 Jun 2009 14:36:37 +0200, Martin v. Löwis wrote: >> See PEP 383. > > Okay, that's useful, except that it may have some bugs: > (...) > Assuming that this gets fixed, it should make most of the problems with > 3.0 solvable. OTOH, it wouldn't have killed them to have added

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Antoine Pitrou
Nobody nowhere.com> writes: > > This results in an internal error: > > > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") > Traceback (most recent call last): > File "", line 1, in > SystemError: Objects/bytesobject.c:3182: bad argument to internal function Please rep

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Sun, 28 Jun 2009 14:36:37 +0200, Martin v. Löwis wrote: >> That's a significant improvement. It still decodes os.environ and sys.argv >> before you have a chance to call sys.setfilesystemencoding(), but it >> appears to be recoverable (with some effort; I can't find any way to re-do >> the enco

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Sun, 28 Jun 2009 21:25:13 +, Benjamin Peterson wrote: >> > The email module is, yes, broken. You can recover the bytestrings of >> > command-line arguments and environment variables. >> >> 1. Does Python offer any assistance in doing so, or do you have to >> manually convert the surrogates

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Gerhard Häring
Scott David Daniels wrote: > Nobody wrote: >> On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: >> >> >> That's a significant improvement >> All in all, Python 3.x still has a long way to go before it will be >> suitable for real-world use. > > Fortunately, I have assiduously avoid

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
On Sun, 28 Jun 2009 23:13:34 +0100, Martin v. Löwis wrote: On behalf of the Python development team, I'm thrilled to announce the first production release of Python 3.1. Why is everyone always thrilled to announce things? I cannot talk about everyone, but in the specific case, I suppose B

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
>> On behalf of the Python development team, I'm thrilled to announce the >> first production release of Python 3.1. > > Why is everyone always thrilled to announce things? I cannot talk about everyone, but in the specific case, I suppose Benjamin was thrilled because it was his first release of

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
On Sat, 27 Jun 2009 22:12:10 +0100, Benjamin Peterson wrote: On behalf of the Python development team, I'm thrilled to announce the first production release of Python 3.1. Why is everyone always thrilled to announce things? Why is noone ever bored to announce? :-) So PEP 378 got in then?

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> 2. How do you do this for non-invertible encodings (e.g. ISO-2022)? ISO-2022 cannot be used as a system encoding. Please do read the responses I write, and please do identify yourself. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Hallvard B Furuseth
Benjamin Peterson writes: >Nobody nowhere.com> writes: >> On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: >> 1. Does Python offer any assistance in doing so, or do you have to >> manually convert the surrogates which are generated for unrecognised bytes? > > fs_encoding = sys.getfiles

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > > On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: > > >> Yes, but do you get back the original byte strings? Maybe I'm missing > >> something, but my impression is that this is still an issue for the email > >> module as well as command-line arguments

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 13:31:50 -0400, Terry Reedy wrote: >>> Nobody nowhere.com> writes: All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. >>> Such as? >> >> Such as not trying to shoe-horn every byte string it encounters into >> Unicode. So

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: >> Yes, but do you get back the original byte strings? Maybe I'm missing >> something, but my impression is that this is still an issue for the email >> module as well as command-line arguments and environment variables. > > The email

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Aahz pythoncraft.com> writes: > Yes, but do you get back the original byte strings? Maybe I'm missing > something, but my impression is that this is still an issue for the email > module as well as command-line arguments and environment variables. The email module is, yes, broken. You can recove

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Aahz
In article , Benjamin Peterson wrote: >Nobody nowhere.com> writes: >> >> Such as not trying to shoe-horn every byte string it encounters into >> Unicode. Some of them really are *just* byte strings. > >You're certainly allowed to convert them back to byte strings if you want. Yes, but do you g

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Paul Moore gmail.com> writes: > The "buffer" attribute doesn't seem to be documented in the docs for > the io module. I'm guessing that the TextIOBase class should have a > note that you get at the buffer through the "buffer" attribute? Good point. I've now documented it, and the "raw" attribut

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Terry Reedy
Nobody wrote: On Sun, 28 Jun 2009 15:22:15 +, Benjamin Peterson wrote: Nobody nowhere.com> writes: All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. Such as? Such as not trying to shoe-horn every byte string it encounters into Unicode. Som

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > > Such as not trying to shoe-horn every byte string it encounters into > Unicode. Some of them really are *just* byte strings. You're certainly allowed to convert them back to byte strings if you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 15:22:15 +, Benjamin Peterson wrote: > Nobody nowhere.com> writes: >> All in all, Python 3.x still has a long way to go before it will be >> suitable for real-world use. > > Such as? Such as not trying to shoe-horn every byte string it encounters into Unicode. Some of th

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 Christian Heimes : > Paul Moore schrieb: >> I had a quick look at the documentation, and couldn't see how to do >> this. It's the first time I'd read the new IO module documentation, so >> I probably missed something obvious. Could you explain how I get the >> byte stream underlying sys.s

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Piet van Oostrum
> Paul Moore (PM) wrote: >PM> 2009/6/28 "Martin v. Löwis" : However, sys.std{in,out,err} are still created as text streams, and AFAICT there's nothing you can do about this from within your code. >>> >>> That's intentional, and not going to change. You can access the >>> underlying

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Christian Heimes
Paul Moore schrieb: > 2009/6/28 "Martin v. Löwis" : >>> However, sys.std{in,out,err} are still created as text streams, and AFAICT >>> there's nothing you can do about this from within your code. >> That's intentional, and not going to change. You can access the >> underlying byte streams if you wa

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 "Martin v. Löwis" : >> However, sys.std{in,out,err} are still created as text streams, and AFAICT >> there's nothing you can do about this from within your code. > > That's intentional, and not going to change. You can access the > underlying byte streams if you want to, as you could alre

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Scott David Daniels
Nobody wrote: On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: That's a significant improvement All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. Fortunately, I have assiduously avoided the real word, and am happy to embrace the w

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > All in all, Python 3.x still has a long way to go before it will be > suitable for real-world use. Such as? -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> That's a significant improvement. It still decodes os.environ and sys.argv > before you have a chance to call sys.setfilesystemencoding(), but it > appears to be recoverable (with some effort; I can't find any way to re-do > the encoding without manually replacing the surrogates). See PEP 383.

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: > Python 3.1 focuses on the stabilization and optimization of the features and > changes that Python 3.0 introduced. For example, the new I/O system has been > rewritten in C for speed. File system APIs that use unicode strings now > h

Re: [Python-Dev] [RELEASED] Python 3.1 final

2009-06-27 Thread Nick Coghlan
Benjamin Peterson wrote: > On behalf of the Python development team, I'm thrilled to announce the first > production release of Python 3.1. Excellent news! Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --

[RELEASED] Python 3.1 final

2009-06-27 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the first production release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of the features and changes that Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. File