PylonsHQ.

Layout: Fixed-width

Planet Pylons

Skip to end of metadata
Go to start of metadata

Entry Date Author Categories RSS
Pylons 1.0 Released
Pylons 1.0 has been released!

It includes some cleanups to the APIs, of course bug fixes, and finally the removal of legacy compatibility code. The latter significantly reduced the Pylons codebase size, which is always a good thing.

There's also a 0.10 release to mostly ease the transition to the 1.0 changes. That's recommended for existing (especially larger) applications.
May 28, 2010 20:23 noreply@blogger.com (Philip Jenvey) jython, python, pylons __boss__
Django vs Pylons: Pylons fails to deliver a pony?
Last year the Django community adopted the Django Pony as their unofficial mascot. Since then, I keep hearing a complaint about Pylons: that it lacks a pony.

I have an important message: this is a falsehood, most likely orchestrated by the Django marketing machine.

Pylons *DOES NOT* lack a pony -- Pylons (actually Paste) has included a pony (paste.pony) out of the box for 3 years, since the Pylons 0.8.1 release. Here's Ben Bangert demoing said pony at a Google tech talk over 2 years ago.

Typical Django and their NIH attitude -- instead of checking if Ian Bicking did it first, they just went off and made their own pony. That's fine though, we don't mind the Django pony. However the lies about Pylons must stop immediately. I demand a retraction and an apology from the Django camp.

Pylons and TurboGears 2 has a significant presence at PyCon if you'd like to apologize in person.
Mar 21, 2009 06:54 noreply@blogger.com (Philip Jenvey) django, python, pylons __boss__
Deploying Pylons Apps to Java Servlet Containers
As of the 0.9.7 release, Pylons now supports Jython 2.5. The new snakefight tool can create a WAR file from a Pylons app via its bdist_war distutils command.

Using bdist_war is simple: just follow these instructions on the Pylons official docs: Pylons on Jython.

The WAR file contains everything you'll need: the Jython runtime and all the eggs your app requires. For Paste style apps, it can automatically generate a deployment descriptor (web.xml) to load the application via modjy (which is now included with Jython as of the beta2 release).

This makes deployment to a J2EE App server incredibly easy, even easier than deploying your app behind Apache or the like.

I'll be giving a talk on Pylons on Jython at PyCon '09 in a couple weeks. 
Mar 11, 2009 02:59 noreply@blogger.com (Philip Jenvey) java, jython, python, pylons __boss__
Pylons 0.9.7 released
After a lengthy release cycle (5 betas, 6 release candidates) the new Pylons 0.9.7 release is finished!

This release is huge:

o Optional SQLAlchemy and Genshi or Jinja2 integration for new projects, out of the box
o Support for Jython 2.5 (and support for Google App Engine with appengine-monkey, and even some success on PyPy)
o New extensive documentation, as well as the Pylons book (which is also available online)
o Now uses the awesome WebOb library
o New PylonsHQ website, powered by CouchDB

and a whole slew of new features and fixes. See the official release announcement for more details.

Feb 23, 2009 19:07 noreply@blogger.com (Philip Jenvey) java, jython, python, pylons __boss__
You Must Construct Additional Pylons (on other VMs)
Occasionally on the Pylons IRC Channel or mailing list someone will reference the game Starcraft, where "Pylons" are structures that act as a power source. Sometimes the game vocally instructs you to construct additional Pylons.

You could say that last month we've constructed a couple additional Pylons, and by that I mean made Pylons run on different environments:

o Pylons on Jython trunk!
o Pylons on Google App Engine via Ian Bicking's appengine-monkey and mako trunk

With the development versions of both Pylons and its dependencies (and the Mako jython branch) I'm now able to create the flicksearch tutorial app from the Pylons Official Docs on Jython.

The Mako jython branch uses Python 2.5's _ast module, which Jython now supports thanks to Frank Wierzbicki's recent work. Mako's also using Armin Ronacher's handy ast module that'll hopefully find its way into the stdlib. Frank and I are still working on smoothing out a couple of our _ast's rough edges, hence the separate Mako jython branch, but Mako is in good shape with 95% of its 214 tests passing (with most of those failures due to the lack of PEP 263 source code encodings, which we'll get to supporting on Jython soon).

According to the Pylons on Jython buildbot, only a few of the Pylons dependency's tests fully pass -- but most of the failing tests are due to unicode issues (again, lack of PEP 263), CPython dict ordering assumed in doctests, and a few other issues that aren't important enough to cover here. Pylons own test failures are only due to unicode issues and lack of support for the Kid and Cheetah templating engines, which Pylons is only testing for the sake of testing alternative templating engines anyway.

The biggest problem with Pylons on Jython so far is running it in development mode with paster serve --reload, which hot reloads your WSGI app whenever a change to one of its files is made. The paster reloader is working but the reloading process is very slow on Jython. Reloading is done by spawning 2 processes; when a file changes, the child process serving your app exits and the parent creates it anew (last time I looked Django and CherryPy's reloaders also work this way). Since CPython startup time, including loading of the entire WSGI app, is pretty quick, this is the safest and probably easiest way to accomplish a reload.

Unfortunately Jython suffers from a lenghty startup time. It takes about 1.5 seconds best case scenario just to get the >>> prompt in Jython on my 2.33ghz MacBook Pro. It takes almost 10 seconds to get paster serve --reload to fully load a simple Pylons app; that's the parent process startup time plus the child process startup time plus the app load time.

I've been experimenting with using Nailgun to improve startup time, but it actually isn't helping Pylons' startup time as much as I thought it might. Jython must have a startup time bottleneck or two that we need to find here.

Nailgun also poses other problems, such as when System.exit()'ing resources like sockets and files are left open unless they're explicitly cleaned up. Worse yet, threads are left running -- and Pylons' paster serve by default loads 10 listener threads.

If we can't drastically improve the startup time issue in Jython sooner rather than later, we can probably come up with a reloader for Jython for the time being that doesn't require a full restart. These can be tricky and in general are avoided, though.

Here's a couple screenshots of Pylons on Jython, showing off a handy feature of dynamic languages on the JVM; just having the ability to play around with Java in an interactive interpreter:

o Pylons-dev WebError on Jython
o Pylons paster shell on Jython

Pylons is also making progress towards an additional release, 0.9.7, which will utilize the work done by the PyCon sprinters (particularly on WebHelpers), WebOb, WebError (and maybe WebTest) and will also include optional support for a basic SQLAlchemy configuration for new projects. As well as Alpha Jython support.
May 05, 2008 02:41 noreply@blogger.com (Philip Jenvey) jython, python, pylons __boss__
setuptools on Jython
A couple weeks ago setuptools added support for Jython trunk. This was made possible with a number of additions and fixes to Jython for setuptools, including distutils and file descriptor support.

A working setuptools is the first big step in getting Pylons working on Jython. Django on Jython has had some recent success; luckily for them Django doesn't rely on/use setuptools at all. So Leo Soto, Jim Baker and the rest of the Django on Jython folks were able to skip directly to kicking around the Django code on Jython.

Now that we have setuptools, the next step is to go through each of Pylons dependencies and ensure their tests pass. Pylons as well as some of its dependencies use the nose test runner. Nose is almost fully working on Jython (after I submit a few upstream patches to nose).

Other dependencies (such as Paste and Beaker) use py.test for their test runners, but there's been some talk of moving some of these over to nose -- which would actually be a good thing right now for Jython. Though technically nose could run through these projects' tests as they already are, they rely on some py.test functionality, such as py.test.raises.

Not to bad mouth py.test -- it has some nice features, like distributed testing -- but I attempted get it working on Jython during the TurboGears 2 sprint a few weeks ago and it wasn't a small task. Part of the problem is the fact that py.test is part of the larger py package. py isn't just a test runner, it also includes other packages that are intertwined with test portion -- all of which need to work before you're able to use just py.test.
Feb 09, 2008 08:15 noreply@blogger.com (Philip Jenvey) jython, python, pylons __boss__
 can't read rss feed "http://groovie.org/xml/atom/category/pylons/feed.xml"; error: "http://groovie.org/xml/atom/category/pylons/feed.xml"
 can't read rss feed "http://blog.workaround.org/category/pylons/feed"; error: "http://blog.workaround.org/category/pylons/feed"

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Powered by Pylons - Contact Administrators