Python Programming, news on the Voidspace Python Projects and all things techie.
A Little Bit of Python: Episodes 11 to 14
Since I last reported on the A Little Bit of Python podcast we've produced three more episodes (but still not managed to get a proper website up). A Little Bit of Python is an occasional podcast on Python related topics with myself, Brett Cannon, Jesse Noller, Steve Holden and Andrew Kuchling.
Episode 11 is an interview I recorded with Antoine Pitrou at PyCon 2010. Antoine is a core-Python developer. As well as having done a lot of work on Python 3, Antoine is also responsible for the "new-GIL". This is a change to the Global Interpreter Lock to improve Python's performance when running multi-threaded code. In this interview we discuss core-Python development, including of course the new-GIL:
Episode 12 is a discussion on general concurrency issues. We discuss the significance of the Global Interpreter Lock (or GIL) and recent work at improving it, PEP 3148 proposing futures as a new asynchronous execution method, some recent IronPython work, and a new Python podcast.
Episode 13 is longer one; a 40 minute discussion covering topics like:
- Python 2.7 beta 1 released.
- PEP 3147: New bytecode directory layout.
- Google's Summer of Code beginning.
- SEC proposes mandating Python's use in financial filings.
- PyCon interview: Dr Tim Couper
- How to Fund Python Development
- Python for Beginners: Getting started on Windows.
The episode 13 files:
Episode 14 is another interview, recorded at PyCon with Christian Tismer. Christian is a long standing member of the Python community and, amongst other things, he is the original creator of Stackless and has worked on both psyco and PyPy. In this interview we discuss all of these projects, both their history and what the future holds for them.
A Little Bit of Python has an iTunes page, an RSS feed and a Twitter account, so you have no excuse for missing it:
If you have feedback, insults or suggestions for new topics you can email us on: firstname.lastname@example.org.
Python 2.7 Release Candidate 1 and unittest 0.4.2
Python 2.7 is nearly here. Release candidate 1 is now out. There will probably be a few minor bugfixes before the final release, but now is the time to test your code with Python 2.7.
Despite the language moratorium there are a host of exciting new features in Python 2.7. You can read about them in what's new (which is rather long), or read a summary in my previous blog entry from when beta 2 was released.
The other exciting release from the last few days is unittest2 0.4.2. unittest2 is a backport of the new features in the Python 2.7 version of the standard library testing framework unittest. Version 0.4.2 has feature parity with unittest in Python 2.7 RC 1 and includes a few bug fixes since the last release.
The major improvements over unittest in Python 2.6 include:
- A standard test runner with automatic test discovery
- Improved command line options - fail fast, control-c catching and buffering standard out
- Many new assert methods
- Improvements to assertRaises (as context manager) and assertAlmostEquals (delta keyword argument)
- Class and module level setup and teardown
- Cleanup functions for better resource handling
- Test skipping and expected failures
- Lots of other minor changes and improvements
For more details see:
Changes since 0.4.1:
2010/06/06 - 0.4.2
Improved help message for unit2 discover -h.
SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported as a skip rather than an error.
Excessively large diffs due to TestCase.assertSequenceEqual are no longer included in failure reports. (Controlled by TestCase.maxDiff.)
Matching files during test discovery is done in TestLoader._match_path. This method can be overriden in subclasses to, for example, match on the full file path or use regular expressions for matching.
Addition of a setuptools compatible entrypoint for the unit2 test runner script. Contributed by Chris Withers.
Tests fixed to be compatible with Python 2.7, where deprecation warnings are silenced by default.
Feature parity with unittest in Python 2.7 RC 1.
The Python Testing Tools Taxonomy
As with many projects it has become a pain to administer and keep updated, so I'm working with Grig to convert the Trac markup into reStructured Text and maintain it in a bitbucket (mercurial) project that is easier to contribute to.
It's still early days (I'm about one third of the way through) but in the spirit of release early and often, what I've done so far is up online in the new home for the Taxonomy:
If anyone has a prettier template & stylesheet for reStructured Text documents then I would much appreciate it; the default one is a bit 'plain'. If you feel like contributing (which would also be much appreciated), the source is available from the bitbucket taxonomy project.
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License.