Python 2.6 and 3.0 Beta 1 Released.

June 19th, 2008 § 10 comments

I can finally crawl out from under the rock I’ve been under to hap­pily pass on the news that Python 2.6 and 3.0 Beta 1 is offi­cially released. For those of you liv­ing on the moon — this release is espe­cially excit­ing for me for a few reasons:

  1. PEP 371, the addi­tion of the pypro­cess­ing mod­ule (as the mul­ti­pro­cess­ing mod­ule) has been implemented.
  2. This was my first seri­ous foray into core-development, so I learned a lot (some rather painfully/embarrassingly).
  3. I ended up with com­mit priv­i­leges so I can help main­tain the new package/module. My first checkin was unfor­tu­nately a patch to dis­able some tests that came in with the package.
  4. I killed the build­bots and delayed the beta.

Mad props/thanks need to be passed on to a few peo­ple — Ben­jamin Peter­son, Adam Olsen, Richard Oud­kerk and many oth­ers helped get this done and helped me debug var­i­ous prob­lems that were exposed after the new pack­age went in.

The docs for the pack­age are here (2.6 dev docs). It’s in both py3k and py2.6

I’ll be work­ing over the next few weeks on clean­ing up the tests, the build and the docs for the new pack­age. I wel­come sug­ges­tions and urge peo­ple to file bugs they find in the bug tracker. Of course, if you include a patch — that’s even better.

If you’re look­ing for some cooler-stuff with the pack­age: Look at the exam­ples. The final one is an exam­ple of how to use the pack­age to spread work amongst a clus­ter of machines.

You’re going to notice some­thing “spe­cial” about the pack­age included in python if you have worked with it in the past: The meth­ods have changed names. There was a dis­cus­sion on Python-Dev in the con­text of the package’s inclu­sion about whether or not to stick with “strict” thread­ing mod­ule API nam­ing, or to take this as a chance to move towards PEP 8-style nam­ing. We chose the lat­ter, and in fact the thread­ing mod­ule itself is get­ting re-worked over time to move to the same PEP-8 style nam­ing (tbd: I still need to pep this up). I think drop­ping the old Java-Style nam­ing and going with Pythonic nam­ing and access­ing of things will be a gen­er­ally Good Thing.

I’ve had to reit­er­ate this a few times — but since I’m cheer­lead­ing, I might as well do it again: I do not think that the addi­tion of this pack­age is the “sil­ver bul­let” for “con­cur­rency in python”. I also don’t think it will solve 100% of all the prob­lems out there for peo­ple. It’s use­ful, and a best of breed: but it is only one step in a larger move­ment. Adop­tion of Adam Olsen’s work, con­tin­u­ing to refine the mul­ti­pro­cess­ing pack­age, and think­ing about dis­trib­uted mes­sage pro­to­cols within the stdlib are just a few of the things we can do.

I’m seri­ously think­ing about doing a intro­duc­tion talk about the new package/concurrency stuff at pycon 09, although I don’t know how many peo­ple would be interested.

Doing all of this work also got me even more excited for 2.6 and 3.0 — I really do rec­om­mend peo­ple down­load the new builds and really ham­mer them, it’s impor­tant the final ver­sions be as bug-free as possible.

  • llim­l­lib

    Do a pycon talk! I’d def­i­nitely be interested.

    Great work.

  • http://collab.nl Thijs

    I just down­loaded the tar­ball for 2.6b1, com­piled in on a mac­book pro (10.5.3) and tried the clus­tered server sam­ple but didn’t get very far.. are you sure it’s in there? :P I’m prob­a­bly miss­ing some­thing here..

    $ python2.6
    Python 2.6b1 (r26b1:64398, Jun 20 2008, 00:33:25)
    [GCC 4.0.1 (Apple Inc. build 5465)] on dar­win
    Type “help”, “copy­right”, “cred­its” or “license” for more infor­ma­tion.
    »> import mul­ti­pro­cess­ing
    Trace­back (most recent call last):
    File “<stdin>”, line 1, in <mod­ule>
    ImportEr­ror: No mod­ule named multiprocessing

  • jnoller

    I hope not! I did all the heavy lift­ing on my mac­book pro, so I just down­loaded the src tar­balls (I’ve been run­ning off of trunk) and I’m check­ing it now.

  • jnoller

    Ok, so I double-checked the source tar­ball, I unpacked it and did the fol­low­ing — “./configure && make” after that, I fired up the python.exe exe­cutable in the build directory:

    woot:Python-2.6b1 jesse$ ./python.exe
    Python 2.6b1 (r26b1:64398, Jun 19 2008, 20:25:19)
    [GCC 4.0.1 (Apple Inc. build 5484)] on dar­win
    Type “help”, “copy­right”, “cred­its” or “license” for more infor­ma­tion.
    »> import mul­ti­pro­cess­ing
    »> dir(multiprocessing)
    [’Array’, ‘Authen­ti­ca­tion­Error’, ‘Bound­ed­Sem­a­phore’, ‘Buffer­TooShort’, ‘Con­di­tion’, ‘Event’, ‘Join­able­Queue’, ‘Lock’, ‘Man­ager’, ‘Pipe’, ‘Pool’, ‘Process’, ‘ProcessEr­ror’, ‘Queue’, ‘RLock’, ‘RawAr­ray’, ‘Raw­Value’, ‘Sem­a­phore’, ‘Time­outEr­ror’, ‘Value’, ‘__all__’, ‘__author__’, ‘__builtins__’, ‘__doc__’, ‘__file__’, ‘__name__’, ‘__package__’, ‘__path__’, ‘__version__’, ‘__warningregistry__’, ‘_multiprocessing’, ‘active_children’, ‘allow_connection_pickling’, ‘cpu_count’, ‘current_process’, ‘freeze_support’, ‘get_logger’, ‘log_to_stderr’, ‘os’, ‘process’, ‘sys’]
    »>

    So, I think it may be some­thing in the com­pile step fail­ing for you, or some­thing else entirely. If you want, you can email me at jnoller at gmail dot youknowwhat.

  • http://collab.nl Thijs

    Get­ting the same results on amd64 ubuntu:

    ~$ python
    Python 2.6b1 (r26b1:64398, Jun 19 2008, 07:34:18)
    [GCC 4.1.3 20070929 (pre­re­lease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
    Type “help”, “copy­right”, “cred­its” or “license” for more infor­ma­tion.
    »> import mul­ti­pro­cess­ing
    Trace­back (most recent call last):
    File “<stdin>”, line 1, in <mod­ule>
    ImportEr­ror: No mod­ule named mul­ti­pro­cess­ing
    »>

    Per­haps it’s related to the fact I have mul­ti­ple Python inter­preters installed (2.3 till 3.0)? I’ll see if I can debug the issue and oth­er­wise I’ll send you that email. Thanks!

  • http://collab.nl Thijs

    Guess this will fix the prob­lem.. http://jessenoller.com/2008/06/19/minor-problem…

  • jnoller

    Yup, some­one filed it last night and added a patch to the tracker. Sorry about the prob­lems — I tend to run from sub­ver­sion rather than doing any sort of make install step

  • http://collab.nl Thijs

    Get­ting the same results on amd64 ubuntu:

    ~$ python
    Python 2.6b1 (r26b1:64398, Jun 19 2008, 07:34:18)
    [GCC 4.1.3 20070929 (pre­re­lease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
    Type “help”, “copy­right”, “cred­its” or “license” for more infor­ma­tion.
    »> import mul­ti­pro­cess­ing
    Trace­back (most recent call last):
    File “<stdin>”, line 1, in <mod­ule>
    ImportEr­ror: No mod­ule named mul­ti­pro­cess­ing
    »>

    Per­haps it’s related to the fact I have mul­ti­ple Python inter­preters installed (2.3 till 3.0)? I’ll see if I can debug the issue and oth­er­wise I’ll send you that email. Thanks!

  • http://collab.nl Thijs

    Guess this will fix the prob­lem.. http://jessenoller.com/2008/06/19/minor-problem…

  • http://jessenoller.com jnoller

    Yup, some­one filed it last night and added a patch to the tracker. Sorry about the prob­lems — I tend to run from sub­ver­sion rather than doing any sort of make install step

What's this?

You are currently reading Python 2.6 and 3.0 Beta 1 Released. at jessenoller.com.

meta