Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [RELEASED] Python 3.1 final

Reply
Thread Tools

[RELEASED] Python 3.1 final

 
 
Benjamin Peterson
Guest
Posts: n/a
 
      06-27-2009
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 system APIs that use unicode strings now handle
paths with undecodable bytes in them. Other features include an ordered
dictionary implementation, a condensed syntax for nested with statements, and
support for ttk Tile in Tkinter. For a more extensive list of changes in 3.1,
see http://doc.python.org/3.1/whatsnew/3.1.html or Misc/NEWS in the Python
distribution.

To download Python 3.1 visit:

http://www.python.org/download/releases/3.1/

The 3.1 documentation can be found at:

http://docs.python.org/3.1

Bugs can always be reported to:

http://bugs.python.org


Enjoy!

--
Benjamin Peterson
Release Manager
benjamin at python.org
(on behalf of the entire python-dev team and 3.1's contributors)
 
Reply With Quote
 
 
 
 
Nobody
Guest
Posts: n/a
 
      06-28-2009
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
> handle paths with undecodable bytes in them.


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).

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.

All in all, Python 3.x still has a long way to go before it will be
suitable for real-world use.

 
Reply With Quote
 
 
 
 
Martin v. Löwis
Guest
Posts: n/a
 
      06-28-2009
> 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.

> 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 already in 3.0.

Regards,
Martin

P.S. Please identify yourself on this newsgroup.
 
Reply With Quote
 
Benjamin Peterson
Guest
Posts: n/a
 
      06-28-2009
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?




 
Reply With Quote
 
Paul Moore
Guest
Posts: n/a
 
      06-28-2009
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 already in 3.0.


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.stdin? (That should give me enough to find
what I was misunderstanding in the docs).

Thanks,
Paul.
 
Reply With Quote
 
Piet van Oostrum
Guest
Posts: n/a
 
      06-28-2009
>>>>> 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 byte streams if you want to, as you could already in 3.0.


>PM> I had a quick look at the documentation, and couldn't see how to do
>PM> this. It's the first time I'd read the new IO module documentation, so
>PM> I probably missed something obvious. Could you explain how I get the
>PM> byte stream underlying sys.stdin? (That should give me enough to find
>PM> what I was misunderstanding in the docs).


http://docs.python.org/3.1/library/sys.html#sys.stdin
--
Piet van Oostrum <>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email:
 
Reply With Quote
 
Nobody
Guest
Posts: n/a
 
      06-28-2009
On Sun, 28 Jun 2009 15:22:15 +0000, 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 them really are *just* byte strings.

 
Reply With Quote
 
Benjamin Peterson
Guest
Posts: n/a
 
      06-28-2009
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.




 
Reply With Quote
 
Terry Reedy
Guest
Posts: n/a
 
      06-28-2009
Nobody wrote:
> On Sun, 28 Jun 2009 15:22:15 +0000, 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 them really are *just* byte strings.


Let's ignore the disinformation. So false it is hardly worth refuting.


 
Reply With Quote
 
Benjamin Peterson
Guest
Posts: n/a
 
      06-28-2009
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" attribute of BufferedIOBase.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word open as Final, not Final Showing Markup Karl Engel Computer Support 4 12-19-2006 04:20 AM
Non-final class at compile-time, final at runtime pietdejong@gmail.com Java 5 11-17-2006 12:30 PM
Difference between static final members and final static members(if any)? JFCM Java 4 02-07-2006 11:32 AM
RELEASED Python 2.3.2 (final) Anthony Baxter Python 5 10-03-2003 01:19 PM
RELEASED Python 2.3 (final) Barry A. Warsaw Python 10 08-01-2003 12:33 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57