Differences between revisions 23 and 36 (spanning 13 versions)
Revision 23 as of 2008-02-25 04:08:30
Size: 4707
Editor: PhilipJenvey
Comment:
Revision 36 as of 2009-09-14 22:04:24
Size: 899
Editor: PhilipJenvey
Comment: jinja 2.2.1 now supports jython
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Pylons (0.9.6.1) on Jython Requirements/TODO
============================================
Pylons on Jython
================
Line 6: Line 6:
Installing Pylons and its dependencies
--------------------------------------
**Status**: `Jython is supported as of Pylons 0.9.7 <http://pylonshq.com/docs/en/0.9.7/jython/>`_
Line 9: Line 8:
  * distutils and setuptools **(distutils is now supported and setuptools-0.6c8 supports jython-trunk, See** `SetuptoolsOnJython`_ ** for more details)** Pending Improvements
====================
Line 11: Line 11:
  * Ensure all dependencies' tests pass

nose
----

Pylons projects require nose, but most packages (including Pylons) use nose as their own test runners.

requires:

  * optparse module **(added in r4018)**

  * a fix for the cell variable (variables used in closures) bug here: http://pylonshq.com/pasties/667 **(fixed in r4038)**

  * fix for new.instancemethod not allowing a PyType as its class argument **(fixed in r4051)**

  * fix for inspect.argspec not working (also needed for Pylons, among other things) **(fixed in r4053)**

  * imp.find_module returned entries in regard to bytecode files instead of .py files when they were available **(fixed in r4080)**

  * fix type names and class __module__ in doctests **(fixed in r4107, 4111)**

  * methods weren't always inheriting their inner functions' __name__ and __doc__ **(fixed in r4109)**

  * compiler package (and compiler requires the parser module which Jython lacks). nose only needs the compiler module to use compiler.consts.CO_GENERATOR; until there's a parser jython will provide a broken compiler module that doesn't import parser **(added in r4114)**

  * Patches to nose for Jython compatibility: http://code.google.com/p/python-nose/issues/detail?id=160

Routes
------
All tests, except some which require paste.fixture (Paste is troublesome to import at this point), pass


Paste, PasteDeploy and PasteScript
----------------------------------
requires:

  * subprocess module: if it doesn't exist (Python 2.3) it uses a version copied over from CPython 2.4 (paste.util.subprocess24) **(added in r4150)**

  * paste.script.util.uuid requires the Python 2.3 int/long unification (PEP 237) phase B **(added in r4175)**

  * modulefinder module (imported in paste/__init__.py). Jython currently lacks it, and modulefinder relies on reading code objects via marshal.load

  * webbrowser module: paste.fixture imports it. Jython doesn't include it. It's a pretty simple module -- though it doesn't seem to work right on Jython when launching a console browser (like lynx or links). I think it's an os.system problem

Mako
----
requires:

  * compiler module: to parse Python code into AST. The compiler module is mostly pure Python code, but its guts are really the native parser module (which Jython lacks)

Beaker
------
requires:

  * Paste (for paste.fixture) **can be installed/imported now**
  * base64.b64encode: might die on an attempting to import b64encode in beaker.crypto.PBKDF2 (at least it does when the tests are run)

WebHelpers
----------
requires:

  * routes **(can be installed/imported now that Paste doesn't blow up)**

  * simplejson **(can be installed now)**

  * webhelpers.textile requires the unicodedata module

FormEncode
----------
requires:

  * gettext (which requires the locale module, which Jython lacks) **(both were added in r4077, 4084)**

simplejson
----------

  * `SetuptoolsOnJython`_ (actually distutils) currently had trouble installing simplejson because it attempts to compile its optional C extensions (that help performance). It expected to catch a distutils.errors.CCompilerError **(fixed in r4157: A CCompilerError is now raised)**

  all simplejson tests pass!

decorator
---------

  * requires function.func_defaults to be writable and it currently isn't on Jython
  * Note: decorators aren't currently supported in Jython, however the decorator module doesn't actually use decorators (works on CPython 2.3)

Later down the road
===================
Support more of the out of the box optional components, such as:
Line 103: Line 16:
  * The `Dialect Refactor II <http://www.sqlalchemy.org/trac/ticket/672>`_ ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, `zxJDBC <http://jython.org/Project/userguide.html#database-connectivity-in-jython>`_.
  
  * Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info `here <http://groups.google.com/group/sqlalchemy/browse_frm/thread/d60db24fe1683a41/09320033f406d78b?hl=en&lnk=gst>`_, and is scheduled to give a talk at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate"
See `SqlAlchemyOnJython`_

Jinja2
------

Jinja2 is supported on Jython as of version 2.2.1

Genshi
------
Jim Baker and Ariane Paola have played around with Genshi on Jython. Its use of pyexpat is the biggest roadblock. Jython now includes a pyexpat, but it's not fully compatible with CPython's (and doesn't support all the features Genshi uses).
Line 110: Line 30:
  * Jim Baker has already started playing with Genshi on the `Jython modern branch <http://fisheye3.cenqua.com/browse/jython/branches/modern>`_ Ariane Paola made some progress porting TurboGears 2 components to Jython for Google's Summer of Code. Genshi and SQLAlchemy are the most important pieces that need porting

Older details: `PylonsOnJythonOld`_

Pylons on Jython

Status: Jython is supported as of Pylons 0.9.7

Pending Improvements

Support more of the out of the box optional components, such as:

SQLAlchemy

See SqlAlchemyOnJython

Jinja2

Jinja2 is supported on Jython as of version 2.2.1

Genshi

Jim Baker and Ariane Paola have played around with Genshi on Jython. Its use of pyexpat is the biggest roadblock. Jython now includes a pyexpat, but it's not fully compatible with CPython's (and doesn't support all the features Genshi uses).

Turbogears 2

Ariane Paola made some progress porting TurboGears 2 components to Jython for Google's Summer of Code. Genshi and SQLAlchemy are the most important pieces that need porting

Older details: PylonsOnJythonOld

PylonsOnJython (last edited 2009-09-14 22:04:24 by PhilipJenvey)