The Artima Developer Community
Sponsored Link

Weblogs Forum
Python 3000 and You

2 replies on 1 page. Most recent reply: May 21, 2008 7:54 AM by Jenny Watson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Guido van van Rossum

Posts: 359
Nickname: guido
Registered: Apr, 2003

Python 3000 and You (View in Weblogs)
Posted: Mar 17, 2008 5:15 PM
Reply to this message Reply
I've posted the slides from my PyCon 2008 keynote on Here are the URLs, plus a warning against the temptation of changing your APIs at the same time as porting to Py3k. This is really important!

The slides of my keynote are now up on There's both a PowerPoint and a PDF file.

I'd like to take this opportunity to remind you of a really important issue that I neglected to mention in the talk: Don't change your APIs incompatibly when porting to Py3k.

Yes, you heard that right: even though Python 3.0 is changing incompatibly, I implore you (especially if you're maintaining a library that's used by others) not to make incompatible changes to your API. If you have make API changes, do them before you port to 3.0 -- release a version with the new API for Python 2.5, or 2.6 if you must. (Or do it later, after you've released a port to 3.0 without adding new features.)

Why? Think of your users. Suppose Ima Lumberjack has implemented a web 2.0 app for managing his sawmill. Ima is a happy user of your most excellent web 2.0 framework. Now Ima wants to upgrade his app to Py3k. He waits until you have ported your framework to Py3k. He does everything by the books, runs his source code through the 2to3 tool, and starts testing. Imagine his despair when the tests fail: how is he going to tell whether the breakage is due to your API changes or due to his own code not being Py3k-ready?

On the other hand, if port your web 2.0 framework to Py3k without making API changes, Ima's task is much more focused: the bugs he is left with after running 2to3 are definitely in his own code, which (presumably :-) he knows how to debug and fix.

The same recommendation applies even more strongly if your library is a dependency for other libraries -- due to the fan-out the pain caused to others multiplies. If one of those packages gives up (even temporarily) its Py3k porting effort, this may prevent many other libraries and apps from being ported at all!

So, once more for emphasis: Don't change your APIs at the same time as porting to Py3k!

Update: Martijn Faassen borrowed the time machine and wrote the same blog entry two weeks ago.

PS. The 3.0final release is now scheduled for September 3, 2008. See PEP 361.

Kevin Teague

Posts: 15
Nickname: wheat
Registered: Mar, 2006

The Python Time Machine is *not* for blog postings! Posted: Mar 18, 2008 3:37 PM
Reply to this message Reply
Ugg. People should not be making casual use of the Python Time Machine. It's is a serious device, and altering the fabric of the space-time continuum can have serious repercussions!

If Martijn Faassen is using the time machine just to write blog postings, then this is a clear abuse of the device. I strongly suspect that your "forgetting" to mention this point at the PyCon keynote is directly related to Martijn's use of the device. I am questioning if he should have his Time Machine license suspended or even revoked ...

Jenny Watson

Posts: 1
Nickname: editoros
Registered: May, 2008

Re: The Python Time Machine is *not* for blog postings! Posted: May 21, 2008 7:54 AM
Reply to this message Reply
Guido - trying to contact you about publishing opportunities. Would enjoy talking to you about Python "3000", etc...

Flat View: This topic has 2 replies on 1 page
Topic: Python 3000 and You Previous Topic   Next Topic Topic: Got whine?

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use