Saturday, June 27, 2009

Python 3.1 released!

I'm happy to announce that today Python 3.1 was released. I won't dwell the new features, since those are more completely listed elsewhere. I'm quite happy with this release. A lot of work has been put into 3.x as stable as its older 2.x siblings. I would like to see a lot of libraries and applications start serious looking at the port to 3.x now. As always there's a bunch of core developers waiting to help on the python-porting mailing list.

Anyway, 3.1 is available for download in source and several binary formats on python.org.

Monday, May 18, 2009

Looking for something to do this summer

School is almost done for me this year. So, I need a job. I unfortunately don't have anything lined up, so I am posting a mini-resume here in the hopes that some employer may be interested.

I have been programming for 4 years now. My experience now is primarily with Python. I have been a core developer of CPython, the main python implementation, for more than a year, where I am the release manager of Python 2.7 and 3.1. Currently, I'm also trying to get into the PyPy project.

Since I am very familiar with CPython's implementation details, I would love to work hacking it this summer. (eg. adding new features for you). Additionally, the changes in Python 3 are very well known to me (I maintain 2to3.); I'd love to assist in porting a library or application to the new, cleaner Python version.

Please feel free to contact me by email: benjamin at python.org

(Also, you happen to need some music composed, I can do that, too.)

Wednesday, May 6, 2009

Python 3.1 beta 1 released

I'm pleased to announce that the first beta of Python 3.1 has been released. In addition to the features found in the previous alphas, the beta has several more improvements. Most importantly, I think, is PEP 383. It defines a way for undecodable paths in file systems to be safely round tripped from Unicode strings. The repr of floats also now uses a new algorithm which determines the shortest possible value.

It is planned that this will be the only beta in order for 3.1 to make a final in late June. Please download it and try it out. This is 3.x's future, and in my opinion, much of an improvement. As always, you can submit any problems you see to bugs.python.org

Wednesday, March 25, 2009

Anniversary

I have now officially been a CPython developer for 1 year. At first it doesn't seem like that long ago, but then I remember all the things I've done over the past year. I had a few imfamous screw-ups in the beginning, but now apparently I'm trusted enough to be the 2.7/3.1 release manager. I'd like to thank all the wonderful people I've met so far (and will soon see in person) including Georg Brandl, Brett Cannon, and Guido himself.

Tuesday, March 24, 2009

unittest - now with test skipping (finally)

Yesterday, I was happy to commit a patch which added test skipping and expected failure support to the venerable unittest module. It adds a skip() method to TestCase, which marks the current test being run as skipped, as well as a set of useful decorators. Here's a short example:

import sys
import unittest

class SkippingExample(unittest.TestCase):

@unittest.skip("testing skipping")
def test_skip_me(self):
self.fail("shouldn't happen")

def test_normal(self):
self.assertEqual(1, 1)

@unittest.skipIf(sys.version_info < (2, 6),
"not supported in this veresion")
def test_show_skip_if(self):
# testing some things here
pass

@unittest.expectedFailure
def test_expected_failure(self):
self.fail("this should happen unfortunately")


# Yes, you can skip whole classes, too!
@unittest.skip("classing skipping")
class CompletelySkippedTest(unittest.TestCase):

def test_not_run_at_all(self):
self.fail("shouldn't happen")


if __name__ == "__main__":
unittest.main()


Running it in verbose mode gives:


__main__.CompletelySkippedTest ... skipped 'classing skipping'
test_expected_failure (__main__.SkippingExample) ... expected failure
test_normal (__main__.SkippingExample) ... ok
test_show_skip_if (__main__.SkippingExample) ... ok
test_skip_me (__main__.SkippingExample) ... skipped 'testing skipping'

----------------------------------------------------------------------
Ran 5 tests in 0.010s

OK (skipped=2, expected failures=1)


I have high hopes for this and Python's regression tests. Hopefully it will simplify the ugly system of test skipping we have now. It should also help us pacify other implementations who want CPython implementation detail tests skipped.

Sunday, March 22, 2009

What awesome feature would you like 2to3 to have?

I'm asking because it's that time of year again where Google pays college students to work on opensource projects. Since Python 3.x is such an important issue in the Python community, the PSF organizers have decided emphasize projects related to 2to3. So far, I've been asked by a few interested students for ideas, and I didn't have many, so I thought I'd ask the users of 2to3. What killer features do you want to see in 2to3?

Saturday, March 7, 2009

First alpha of Python 3.1 released

Today, I released the first alpha of the next version of Python 3000, Python 3.1. Most people will be excited about the rewrite of the io module in C for speed, but 3.1 also includes some neat features. The collections module acquired both an ordered dictionary and a multiset.

You can download it on python.org. Please test the new version with your applications and libraries and report bugs to bugs.python.org.