1405
Comment: updates
|
6829
update on paste selecting on files
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
The things/steps needed to get Pylons running on Jython: | #format rst |
Line 3: | Line 3: |
* The ability to install Pylons and all its dependencies: | Pylons (trunk, 0.9.7) on Jython Requirements/TODO ================================================= |
Line 5: | Line 6: |
- distutils and setuptools (See SetuptoolsOnJython) | Installing Pylons and its dependencies -------------------------------------- |
Line 7: | Line 9: |
Ensure all dependencies' tests pass: | * distutils and setuptools **(distutils is now supported and setuptools-0.6c8 supports jython-trunk, See** `SetuptoolsOnJython`_ ** for more details)** |
Line 9: | Line 11: |
* Paste, PasteDeploy and PasteScript | * Ensure all dependencies' tests pass. Pylons on jython buildbot: http://pylonshq.com:8014/ |
Line 11: | Line 13: |
* Mako | nose ---- |
Line 13: | Line 16: |
* Beaker | **nose trunk is now fully supported on Jython** |
Line 15: | Line 18: |
* nose - nose requires the optparse (easy) and compiler modules (sort of easy -- compiler requires the parser module, which won't be easy to get on Jython). nose only needs the compiler module to use compiler.consts.CO_GENERATOR; maybe jython could provide a broken compiler module that doesn't import parser. |
Pylons projects require nose, but most packages (including Pylons) use nose as their own test runners. |
Line 18: | Line 20: |
* Routes | requires: |
Line 20: | Line 22: |
- (I actually got all of routes' tests to pass on Jython well over a year ago -pjenvey) | * optparse module **(added in r4018)** |
Line 22: | Line 24: |
* WebHelpers | * a fix for the cell variable (variables used in closures) bug here: http://pylonshq.com/pasties/667 **(fixed in r4038)** |
Line 24: | Line 26: |
* FormEncode | * fix for new.instancemethod not allowing a PyType as its class argument **(fixed in r4051)** |
Line 26: | Line 28: |
* simplejson | * fix for inspect.argspec not working (also needed for Pylons, among other things) **(fixed in r4053)** |
Line 28: | Line 30: |
* decorator | * imp.find_module returned entries in regard to bytecode files instead of .py files when they were available **(fixed in r4080)** |
Line 30: | Line 32: |
- Note: decorators aren't currently supported in Jython, however the decorator module doesn't actually use decorators (works on CPython 2.3) | * fix type names and class __module__ in doctests **(fixed in r4107, 4111)** |
Line 32: | Line 34: |
Later down the road: | * methods weren't always inheriting their inner functions' __name__ and __doc__ **(fixed in r4109)** |
Line 34: | Line 36: |
* SQLAlchemy. The [http://www.sqlalchemy.org/trac/ticket/672 Dialect Refactor II] ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, [http://jython.org/Project/userguide.html#database-connectivity-in-jython zxJDBC]. Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info [http://groups.google.com/group/sqlalchemy/browse_frm/thread/d60db24fe1683a41/09320033f406d78b?hl=en&lnk=gst here] | * 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 pass, minus one doctest (that fails due to expecting CPython dict ordering)** Paste ---------------------------------- 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 **(modulefinder added in r4179)** * webbrowser module: paste.fixture imports it, Jython doesn't include it. It's pretty useless without the platform dependent CPython ic module on most environments. Without that, only console based browsers work and Jython's os.system can't redirect their stdin to actually make them usable **(Paste/WebTest trunk now only import webbrowser when it's needed)** * paste.util.quoting required a quirky fix to re.sub **(fixed in r4343)** * some tests rely on source code encodings (PEP 263) support * selectable files: cgiapp selects on files. we can emulate selectable files if the file is backed by a FileChannel, but cgiapp also selects on a subprocess's (with stdout=PIPE) stdout file, which is backed by a StreamIO. We'll probably never be able to fully support this module in Jython PasteDeploy ----------- **All tests pass** PasteScript ----------- PasteScript imports a number of CPython only modules (like pwd and fcntl) **(now conditionally)** * One failing test requires the Cheetah templating language (maybe we'll just skip it) * test_egg_finder doesn't seem to have its paths setup correctly WebOb ----- All the important tests are passing, the current failures are either due to testing > 2.3 behavior, and one due to cStringIO's repr not matching CPython's WebTest ------- **All tests pass** WebError -------- **All tests pass** Mako ---- requires: * _ast module: mako trunk includes support for parsing Python code via _ast. Frank is busy working on _ast support * some tests rely on source code encodings (PEP 263) support Beaker ------ **All tests pass** 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) **fixed, b64encode is 2.4 specific, 2.3 backwards compat was added** 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 **now imported only when needed** * some tests rely on source code encodings (PEP 263) support * the literal object requires a fix for our str/unicode __add__/__radd__ problems FormEncode ---------- requires: * gettext (which requires the locale module, which Jython lacks) **(both were added in r4077, 4084)** * required a couple fixes dealing with metaclasses **(fixes in r4336, r4339)** * some tests rely on source code encodings (PEP 263) support * attempts to import xml.parsers.expat.ExpatError * uses elementtree which doesn't work (yes I mean the pure python version) due to reliance on xml.parsers.expat simplejson ---------- **all simplejson tests pass** * `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)** decorator --------- * requires function.func_defaults to be writable and it currently isn't on Jython **(fixed in 4177)** * 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 =================== SQLAlchemy ---------- * 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>`_. Jason Kirtland has begun working on this. * 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 gave a talk on his preliminary work at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate" Turbogears 2 ------------ * Jim Baker started playing with Genshi on Jython. Genshi's Markdown class requires the same str/unicode __add__/__radd__ fix webhelpers needs. * Ariane Paola has submitted an application to work on porting TurboGears 2 components to Jython for Google's Summer of Code * There's also a Zope on Jython application |
Pylons (trunk, 0.9.7) on Jython Requirements/TODO
Installing Pylons and its dependencies
- distutils and setuptools (distutils is now supported and setuptools-0.6c8 supports jython-trunk, See SetuptoolsOnJython ** for more details)**
- Ensure all dependencies' tests pass. Pylons on jython buildbot: http://pylonshq.com:8014/
nose
nose trunk is now fully supported on Jython
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 pass, minus one doctest (that fails due to expecting CPython dict ordering)
Paste
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 (modulefinder added in r4179)
- webbrowser module: paste.fixture imports it, Jython doesn't include it. It's pretty useless without the platform dependent CPython ic module on most environments. Without that, only console based browsers work and Jython's os.system can't redirect their stdin to actually make them usable (Paste/WebTest trunk now only import webbrowser when it's needed)
- paste.util.quoting required a quirky fix to re.sub (fixed in r4343)
- some tests rely on source code encodings (PEP 263) support
- selectable files: cgiapp selects on files. we can emulate selectable files if the file is backed by a FileChannel, but cgiapp also selects on a subprocess's (with stdout=PIPE) stdout file, which is backed by a StreamIO. We'll probably never be able to fully support this module in Jython
PasteDeploy
All tests pass
PasteScript
PasteScript imports a number of CPython only modules (like pwd and fcntl) (now conditionally)
- One failing test requires the Cheetah templating language (maybe we'll just skip it)
- test_egg_finder doesn't seem to have its paths setup correctly
WebOb
All the important tests are passing, the current failures are either due to testing > 2.3 behavior, and one due to cStringIO's repr not matching CPython's
WebTest
All tests pass
WebError
All tests pass
Mako
requires:
- _ast module: mako trunk includes support for parsing Python code via _ast. Frank is busy working on _ast support
- some tests rely on source code encodings (PEP 263) support
Beaker
All tests pass
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) fixed, b64encode is 2.4 specific, 2.3 backwards compat was added
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 now imported only when needed
- some tests rely on source code encodings (PEP 263) support
- the literal object requires a fix for our str/unicode __add__/__radd__ problems
FormEncode
requires:
- gettext (which requires the locale module, which Jython lacks) (both were added in r4077, 4084)
- required a couple fixes dealing with metaclasses (fixes in r4336, r4339)
- some tests rely on source code encodings (PEP 263) support
- attempts to import xml.parsers.expat.ExpatError
- uses elementtree which doesn't work (yes I mean the pure python version) due to reliance on xml.parsers.expat
simplejson
all simplejson tests pass
- 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)
decorator
- requires function.func_defaults to be writable and it currently isn't on Jython (fixed in 4177)
- 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
SQLAlchemy
- The Dialect Refactor II ticket will need to be implemented to properly support using SQLAlchemy via Jython's DBAPI jdbc driver, zxJDBC. Jason Kirtland has begun working on this.
- Frank Wierzbicki has done some preliminary work on using SQLAlchemy with Jython, info here, and gave a talk on his preliminary work at PyCon 2008: "Database development with Jython, SQLAlchemy, and Hibernate"
Turbogears 2
- Jim Baker started playing with Genshi on Jython. Genshi's Markdown class requires the same str/unicode __add__/__radd__ fix webhelpers needs.
- Ariane Paola has submitted an application to work on porting TurboGears 2 components to Jython for Google's Summer of Code
- There's also a Zope on Jython application