Differences between revisions 43 and 44
Revision 43 as of 2008-01-03 23:51:06
Size: 8663
Editor: c-67-177-212-165
Comment:
Revision 44 as of 2008-01-04 04:29:51
Size: 9664
Editor: c-67-177-212-165
Comment: Added what we need to get modern into trunk
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
 * Use the backend [https://jython.svn.sourceforge.net/svnroot/jython/trunk/sandbox/jbaker/django/db/backends/postgresql_zxjdbc/ zxjdbc_postgresql], which was contributed by Leo Soto.  * Use the database backend [https://jython.svn.sourceforge.net/svnroot/jython/trunk/sandbox/jbaker/django/db/backends/postgresql_zxjdbc/ zxjdbc_postgresql], which was contributed by Leo Soto.
Line 23: Line 23:
 * Many doctests are fragile, because they depend on the dict traversal ordering; in Jython, this is different that CPython, and if we adopt !ConcurrentHashMap, it's not even repeatable. This is a pervasive bug in Django.  * Many doctests are fragile, because they depend on the dict traversal ordering; in Jython, this is different that CPython, and if we adopt {{{ConcurrentHashMap}}}, it's not even repeatable. This is a pervasive bug in Django.
Line 25: Line 25:
 * We still have some encoding problems, again seen in doctests. An example where output is expected to be lower case hex, not upper case. I fixed the problem in !PyUnicode, but there are more places.  * We still have some encoding problems, again seen in doctests. An example where output is expected to be lower case hex, not upper case. I fixed the problem in {{{PyUnicode}}}, but there are more places.
Line 27: Line 27:
 * Problem with the !ManagerDescriptor handling, in django.db.models.manager.  * Problem with the {{{ManagerDescriptor}}} handling, in {{{django.db.models.manager}}}.
Line 29: Line 29:
 * No decorators yet! (But they are coming soon, even available experimentally for Jython.)  * No decorators yet! (But they are coming soon, and are now available experimentally for Jython.)
Line 33: Line 33:
----

Before we can push modern into trunk, the following needs to be done:

 * The test_extcall unit test currently fails. This appears to be a dependency on the dict traversal being the same. However, it's a mind bending test. The 2.3 version is particularly problematic because it's not modular at all. Google's GHOP has produced an improved version for Python 2.6 - we will look at this as a starting point.

 * Tristan King provided a near complete subset of the functionality for {{{time.strptime}}}, as implemented in org.python.modules.time.Time. This needs to be enhanced. All unit tests in the CPythonLib version of test_time now pass except for {{{strptime}}} -- specifically the conversion specifier {{{'%c'}}} -- so we can also move to that, and discard our Jython version, when this is completed. That should be soon!

 * Decide whether we should use {{{ConcurentHashMap}}} or not as the backing hash map for {{{dict}}} and {{{__dict__}}}.

Gaps between Jython and Django

[http://pipes.yahoo.com/pipes/pipe.info?_id=jroxOD1f3BGgvtiIqGIyXQ RSS Aggregator for blog posts about Django on Jython]

To run Django on Jython, with a PostgreSQL backend, the following steps are necessary:

Here's what works:

syncdb and the very cool Django admin run; many unit tests pass. You can run with internationalization enabled. You do need to run the dev server with --noreload for now. We need to document here how to run with [http://www.xhaus.com/modjy/ modjy], which is Alan Kennedy's servlet container for WSGI apps.

In running the model unit tests, here are the things we seem to be missing, accounting for most of the approximately 75 failures:

  • Many doctests are fragile, because they depend on the dict traversal ordering; in Jython, this is different that CPython, and if we adopt ConcurrentHashMap, it's not even repeatable. This is a pervasive bug in Django.

  • We still have some encoding problems, again seen in doctests. An example where output is expected to be lower case hex, not upper case. I fixed the problem in PyUnicode, but there are more places.

  • Problem with the ManagerDescriptor handling, in django.db.models.manager.

  • No decorators yet! (But they are coming soon, and are now available experimentally for Jython.)

There may be some other rough categories, we need to look at the failures more systematically. All that doctest noise is certainly annoying!


Before we can push modern into trunk, the following needs to be done:

  • The test_extcall unit test currently fails. This appears to be a dependency on the dict traversal being the same. However, it's a mind bending test. The 2.3 version is particularly problematic because it's not modular at all. Google's GHOP has produced an improved version for Python 2.6 - we will look at this as a starting point.
  • Tristan King provided a near complete subset of the functionality for time.strptime, as implemented in org.python.modules.time.Time. This needs to be enhanced. All unit tests in the CPythonLib version of test_time now pass except for strptime -- specifically the conversion specifier '%c' -- so we can also move to that, and discard our Jython version, when this is completed. That should be soon!

  • Decide whether we should use ConcurentHashMap or not as the backing hash map for dict and __dict__.

Former Major problems

(Preserved to show how much we had to go through...)

Former Minor annoyances

Already Fixed

(And many more!)

DjangoOnJython (last edited 2014-05-22 23:24:19 by AdamBurke)