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 which are

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 encoding

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Antoine Pitrou
Nobody nobody at 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 stdin, line 1, in module SystemError: Objects/bytesobject.c:3182: bad argument to internal function Please

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Hallvard B Furuseth
Nobody nob...@nowhere.com 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

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Paul Moore
2009/6/29 Antoine Pitrou solip...@pitrou.net: 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

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 Nobody
On Mon, 29 Jun 2009 11:41:11 +, Antoine Pitrou wrote: Nobody nobody at 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 stdin, line 1, in module SystemError:

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. That on

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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nobody at 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 Scott David Daniels
Nobody wrote: On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: announcement of 3.1 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 Martin v. Löwis mar...@v.loewis.de: 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Christian Heimes
Paul Moore schrieb: 2009/6/28 Martin v. Löwis mar...@v.loewis.de: 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Piet van Oostrum
Paul Moore p.f.mo...@gmail.com (PM) wrote: PM 2009/6/28 Martin v. Löwis mar...@v.loewis.de: 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 Christian Heimes li...@cheimes.de: 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 15:22:15 +, Benjamin Peterson wrote: Nobody nobody at 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nobody at 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. --

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 nobody at 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Paul Moore p.f.moore at 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Aahz
In article mailman.2254.1246209871.8015.python-l...@python.org, Benjamin Peterson benja...@python.org wrote: Nobody nobody at 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

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Aahz aahz at 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

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 module

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 13:31:50 -0400, Terry Reedy wrote: Nobody nobody at 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 them

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nobody at 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 Hallvard B Furuseth
Benjamin Peterson writes: Nobody nobody at 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 =

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 Rhodri James
On Sat, 27 Jun 2009 22:12:10 +0100, Benjamin Peterson benja...@python.org 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

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 mar...@v.loewis.de 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

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: announcement of 3.1 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

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 a

[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

[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

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