Differences between revisions 39 and 40
Revision 39 as of 2007-10-02 14:56:57
Size: 5598
Editor: n01-114
Comment: added links to django patches for __unicode__ and non-descriptor methods.
Revision 40 as of 2007-10-07 03:19:13
Size: 5473
Editor: pc-112-141-104-200
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
   * I found that {{{object.__unicode__}}} doesn't exist in CPython, and if it's removed from jython this works as expected. [https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1800378&group_id=12867 bug] [https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1800381&group_id=12867 patch] -- TristanKing [https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1800378&group_id=12867 bug] [https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1800381&group_id=12867 patch] -- TristanKing

Gaps between Jython and Django

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

Major problems

  • Jython does not support non-str keys in __dict__ right now. Jim Baker replaced the custom dictionary in PyStringMap with a HashMap (along Groves' earlier work). This change should resolve this problem. Try the [https://jython.svn.sourceforge.net/svnroot/jython/branches/modern/ modern] branch. Problem encountered in django/utils/_threading_local.py.

[https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1800378&group_id=12867 bug] [https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1800381&group_id=12867 patch] -- TristanKing

Minor annoyances

Already Fixed

  • Jython does not have sys.stdout.isatty. Jython should get added to the exclusions around that call in django/core/management.py (win32 and 'Pocket PC' are already excluded).

  • stringmap (or the __dict__ implementation) needs a pop(o) method.

  • Jython lists and tuples don't have __iter__ .

  • Jython does not have os.getpid().

    • Django workarounds it now.
  • Jython does not have os.W_OK needed in django/core/management.py. This probably will not be hard to add this since java.io.File has a canWrite().

    • os.chmod should be implemented too (After checking for write permissions, Django will try to change them if necessary).

      • That's hard. Maybe Django shouldn't check for permissions if running on Jython.
    • Django don't check or change file permissions when running on Jython now
  • The U (Universal newlines) flag for open() isn't recognized on Jython

  • Unicode string interpolation doesn't work

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