Differences between revisions 33 and 35 (spanning 2 versions)
Revision 33 as of 2007-09-23 06:51:16
Size: 5317
Editor: quiver
Comment:
Revision 35 as of 2007-09-23 19:08:14
Size: 5105
Editor: pc-112-141-104-200
Comment: universal newlines and unicode interpolation are fixed now
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * Unicode string interpolation doesn't work in the general case. [http://sourceforge.net/tracker/index.php?func=detail&aid=1799328&group_id=12867&atid=112867 bug] [http://sourceforge.net/tracker/index.php?func=detail&aid=1799330&group_id=12867&atid=312867 patch]
   *
There is also a problem with the algorithm deciding whether to call {{{__str__}}} or {{{__unicode__}}}. More research is needed, but it affects the lazy string evaluation on which the Django i18n system relies ({{{django/utils/functional.py}}}).
   * 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
 * There is a problem with the algorithm deciding whether to call {{{__str__}}} or {{{__unicode__}}}. More research is needed, but it affects the lazy string evaluation on which the Django i18n system relies ({{{django/utils/functional.py}}}), among other things.
   * 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
Line 12: Line 11:
 * {{{django/views/debug.py}}} wants to know a function's __module__. functions don't have a __module__ attribute in jython yet. [http://sourceforge.net/tracker/index.php?func=detail&aid=1800472&group_id=12867&atid=312867 patch]  * {{{django/views/debug.py}}} wants to know a function's {{{__module__}}}. functions don't have a {{{__module__}}} attribute in jython yet. [http://sourceforge.net/tracker/index.php?func=detail&aid=1800472&group_id=12867&atid=312867 patch]
Line 19: Line 18:
 * The {{{U}}} (Universal newlines) flag for {{{open()}}} isn't recognized on Jython
Line 28: Line 26:
   *
Line 45: Line 42:
   * Django don't tries to check or change file permissions when running on Jython now    * 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

Gaps between Jython and Django

Major problems

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)