加载中...
Fork me on GitHub

Python 3 Resources for Python developers and users

On second thought, let's not go to Camelot. It is a silly place.
Monty Python and the Holy Grail

Note: We have mirrored Mark Pilgrim's excellent Dive into Python 3 book here: getpython3.com/diveintopython3/. Git mirror here: diveintopython3
Thank you, Mark.

New! Python 3.3 is coming! - this is a major update to Python 3 and includes a variety of changes including PEP 380 support among other things. Check it out!

Introduction

Welcome to getpython3.com - this site aims to be a resource for Python 3 for developers. This includes guides, videos, tutorials and other resources to help you and your team achieve a successful Python 3 port of your application, library, framework or tool. Also included is information on Python Software Foundation financial grants for porting to Python 3, other significant projects working on Python 3, as well as potential information on companies willing to fund or provide grants for Python 3 porting.

What is Python 3?

Short version: Although most Python code is written for Python 2.x, Python 3.x is the present and future of the language.

At the time of writing (Sept 28, 2011), the final 2.7 release is out, with a statement of extended support for this end-of-life release. The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen stable releases, such as the recent 3.2. This means that all recent standard library improvements, for example, are only available in Python 3.x.

Guido van Rossum (the original creator of the Python language), in conjunction with other python-core developers decided to clean up Python 2.x properly, with less regard for backwards compatibility than is the case for new releases in the 2.x range. The most drastic improvement is the better unicode support (with all text strings being unicode by default) as well as saner bytes/unicode separation.

Besides, several aspects of the core language (such as print and exec being statements, integers using floor division) have been adjusted to be easier for newcomers to learn and to be more consistent with the rest of the language, and old cruft has been removed (for example, all classes are now new-style, range() returns a memory efficient iterable, not a list as in 2.x).

The What's New in Python 3.0 document provides a good overview of the major language changes and likely sources of incompatibility with existing Python 2.x code.

Cribbed from Python2orPython3 on the Python wiki.

Download Information

The most current version of Python 3 is 3.2.2 - here's a list of new things:

  • numerous improvements to the unittest module
  • PEP 3147, support for .pyc repository directories
  • PEP 3149, support for version tagged dynamic libraries
  • PEP 3148, a new futures library for concurrent programming
  • PEP 384, a stable ABI for extension modules
  • PEP 391, dictionary-based logging configuration
  • an overhauled GIL implementation that reduces contention
  • an extended email package that handles bytes messages
  • a much improved ssl module with support for SSL contexts and certificate hostname matching
  • a sysconfig module to access configuration information
  • additions to the shutil module, among them archive file support
  • many enhancements to configparser, among them mapping protocol support
  • improvements to pdb, the Python debugger
  • countless fixes regarding bytes/string issues; among them full support for a bytes environment (filenames, environment variables)
  • many consistency and behavior fixes for numeric operations

You can see details on what's changed by looking at the "What's New in 3.2" document as well as "What's New in 3.0", and the change log. Builds are available for all major platforms, and OS X users can use homebrew via "brew install python3"

Go Here to Download »

Notable Ports

The follow libraries/projects and frameworks are notable additions to the Python 3 ecosystem. Some of these represent entire frameworks, while others are major dependencies for other projects and tools:

You can see a semi-complete list of all Python 3 supporing packages on PyPi here.

Financial support

In short: yes - there's a bevy of information, videos and blog posts out there that can help you on your way. Python 3 is the future of the Python language, and entities such as the Python Software Foundation strongly believe in supporting the porting effort.

For example, the Python Software Foundation has issued developer grants to port projects such as the email package, PyOpenSSL, and WebOb. It has also provided developer grants for other general Python development work, such as to Brett Cannon that allowed him to completely revamp the Python developer's guide.

The Python Software Foundation is here for not just CPython, or python-core, or python-the-language. It is here for Python - the community, it's efforts, its developers, designers and people.

Certain projects - most notably PyPy - have already started donation programs to help fund large-scale development efforts to Python 3. Others may follow

New! Jesse Noller is currently offering to help library, framework and other individuals help in writing grant applications for funding efforts. See this post for details.

Information on how to structure grant applications, and where to send them will be coming shortly. If you are a company, or represent a company that is interested in helping fund Python 3 porting efforts, please email jnoller@python.org with information and details. I will coordinate with you, projects, and the Python Software Foundation.

How to find projects

If you are looking to help - but are not the maintainer of a module, library, etc there are various ways you can help. For example, see Brett Cannon's "Python 3 Support on PyPI" site, that lists out various projects that support, or do not support Python 3. You can always find some project there, or elsewhere that can use assistance in porting.

Additionally, there are threads and sites out there (such as Tarek's post on google+) where people have come out and voted for libraries they need ported to Python 3 so they can in turn make the transition.

Resources

There is a wealth of information out there on Porting to, and about Python 3. There is an entire mailing list (python-porting) dedicated to helping people port things to Python 3 - developers experienced in porting should join up, and there is already a good team there to help support you.

Source code to this site available on github.