Merging onto the evolutionary highway

2009-03-28 (permalink tags: , )

Blogging live from PyCon. Guido van Rossum opened the morning session with the keynote talk. He covered a lot of ground but one idea that struck me is that he wants to more of less freeze the standard library.

He proposes that with a perfectly valid rational: if the Python dev team removes a module from the standard lib, some program out there will break and on the other hand, if a new module is added to the standard lib, it has to be extremely stable since it will now be tied to the somewhat slow release schedule of CPython. That position is obvious but Guido also mentioned that more work is getting done on the specification of modules dependencies and that is the key to a dramatically new landscape in the Python world.

Setuptools already did a very good job at dependencies specification and Guido did acknowledge it. With Setuptools, one can define that his package will depend on some other package with a dependency spec of the form "depname>=1.3.5". Once you know the dependencies of a package, it's almost trivial to write a tool that will install a package and all its dependencies; easy_install is a good example of such a tool.

In the early days of Python, one popular slogan was "Python, batteries included". I remember that it was a very important selling point. Python programs were inherently portable they could rely on all these modules in the standard library; SMTP connections, color space conversions, HTML parsing, and many others: it was all in there. Installation instructions were always as simple as "install Python, run my code".

Coming from a C++ background, that was great. Since there is almost nothing in the C++ standard library beside basic input/output primitives and very basic container templates, your typical C++ program depends on a lot of third party modules. And since C++ has no packaging system, you typically have to include per-platform and even per distribution installation instructions: "On Debian apt-get install that and that, on Red Hat yum install that thing then grab some tarball from there, hack the Makefile and pray."

Over the years I found more and more great packages that were not in the standard Python library so my installing instructions became more complicated. Until I discovered easy_install. With Setuptools and easy_install you only have to record your dependencies in machine readable form and you're done. The tools will take care of downloadind and installing the packages that you depend on, taking care of everything that is platform specific. At first, I saw easy_install as just another neat tool that made it easier to write installation instructions. I had completely missed the point.

With a good cross platform packaging system like the one that we now have for Python, the standard library suddenly becomes completely irrelevant. You don't need the "battery included" because you can get batteries for free at every street corner; all what you need in the standard lib is enough network support to implement a tool like easy_install.

A language that reaches that point is now on the evolutionary highway. The tools and the libraries can evolve in a really tight feed-back loop as the core language moves at a slower, very stable, cautious but steady pace. Definitely, these are great times to be a Python hacker. Whatever happens from now on will be fast, surprising, and it can only lead us to a better ecosystem.

Comments

2009-03-30 17:13:28 by Julien (direct link | reply)

Merci de partager ces news du Pycon! Pendant ton séjour à Chicaco, si tu veux te tenir au courant des dernières nouvelles des codeurs à Montréal tu peut checker mon app : montrealhackers.com

J'y ai ajouté ton feed :)

Leave a comment