Pycon 08 Wrapup

March 21, 2008 at 01:48 PM | Code, SQLAlchemy, Talks

Jason and I spent a full eight days in Chicago this year, with a full slate of activities. While we didn't commit to SQLAlchemy sprints ahead of time (and were therefore not officially rostered), we sprinted the entire time on SA and had picked up two or three folks to sprint with us, as well as helped with some "parallel" SQLAlchemy-related sprints - next year we'll definitely plan ahead of time so that people can get involved sooner and more explicitly.

Pycon started off for SA with a big full day of tutorials, with the work split up among myself, Jason, and Jonathan Ellis. Jonathan did his beginner tutorial, Jason and I did the advanced. The huge winner for this tutorial was the slide runner we came up with ("we" means, I wrote a little 20 line header to page through a Python script one chunk at a time, Jason ran 100 miles further with the idea to turn it into a full blown interactive Python prompt). Using the runner, everyone in the room could keep hitting "enter" and each chunk of code on the projector would come out on their screen and execute itself, leaving them at a Python prompt where they could further explore the constructs that were just created. Some people just sat back and watched the code go by, others dug in and answered our exercise questions with it.

Next up was my "SQLAlchemy 0.4 and Beyond" talk where my goal was to bring people up to speed on where we're at right now, including where we came from, some of the problems we had, and what we've done about them, then segueing into some deeper examples from the current release and into some of the more interesting projects that are underway.

Onto the sprints. By the time they started, we had already met with various people and attended a few BOFs as well. Here's a rundown of everything going on:

  • Jython - Frank Wierzbicki, recently hired by Sun to work full time on Jython, had presented his Jython integration of SQLAlchemy. Frank and I could not share the same goals more closely; both coming from an "enterprisey" Java background, we are well aware that there's a vast world of Java developers who would flock to Python if a Java-compatible yet Pythonic toolset were available, particularly including an ORM with features comparable to Hibernate. Jason and Frank met up during the sprints to align their architectural paths, as Jason has been working very hard on a full-blown multi-dialect architecture, which will allow the maximum amount of reuse of dialects among any number of DBAPI connectors. An example is to use the same MySQL compiler with MySQLDB, JDBC, and pyODBC. Stub modules which account for the idiosyncrasies of each DBAPI would draw upon the central MySQL functionality. So with a little more effort that's underway, SQLAlchemy should work fully out of the box on Jython trunk in the very near future.
  • Django - yup, a lot went on with Django and SQLAlchemy this year. We met with a whole room full of Djangoers who've expressed the ongoing desire for Django to have a tighter integration layer with SQLAlchemy available as an option. Michael Trier spearheaded the effort, showing us some of the work he and his team had already completed with their own django-sqlalchemy layer. We sat down and shared a lot of notes and ideas, including using the new SQLAlchemy "Declarative" plugin as a guide for developing their own solution, as well as some strategies for best integrating SQLAlchemy connection/transaction management with Django's own transaction middleware. We had an initial mini-sprint during an earlier BOF and then we communicated throughout the main sprints. Jason has hinted he might give Django a try on an upcoming project which would give us a great chance to give it a test spin and fine tune it.
  • Zope - I was thrilled to spend pretty much the entire sprint alongside Christian Theune, a very experienced developer from whom I sought to learn as much as possible. His company already uses a SQLAlchemy/Zope integrated application, and he was very interested in the new custom instrumentation branch, which was started to enable Philip Eby to integrate SQLAlchemy with Trellis. Christian worked through the branch, which presents an entirely open-ended way to redefine how SQLAlchemy classes are instrumented (or not), to make it such that all access to the mapped class and its instances, including SQLA's own private attributes, may be mediated through external code, thus allowing his application to use Zope security proxies to broker access to all end-user instances and classes. At the same time, Christian is also interested in full session rollback capability, something we were already starting to implement, so we're also finally getting deep into letting SA rollback the internal state of its Session in a clean way, so that rollbacks within transactions or SAVEPOINTs will leave you with a session that remains fully usable without needing to expire its contents. The comprehensive rollback feature will appear as an option sometime within the 0.4 series and be on by default in 0.5.
  • Pylons/Turbogears - This is of course our main stomping ground. SQLA sprints took place in the same room as the Pylons TG sprint and there was much beer and margaritas consumed. Chris Perkins of DBSprokets fame has signed on with myself and Mark Ramm to make some progress on the Prentice Hall SQLAlchemy book....but for the impatient there will already be an Oreilly book available in June.

All in all Pycon was fantastic (I missed the controversial lightning talks), the crowd was great (and much bigger), and I got to meet a whole lot of fans..particularly Chris McAvoy who's probably the most old school - he was one of the very first Myghty users. Don't weep for Myghty though, if you use Pylons with Mako, they're both direct descendants.