Differences between revisions 37 and 39 (spanning 2 versions)
Revision 37 as of 2007-09-24 03:38:07
Size: 5396
Editor: pc-112-141-104-200
Comment: Added a link to the yahoo pipe created by Marty Alchin with the D+J blog posts
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.
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
 * 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.
Line 30: Line 29:
 * Jython methods are not descriptors. It seems a implementation detail. [https://hg.leosoto.com/django.jythonport/diff/50371f2df15a/django/dispatch/saferef.py Here] is the relevant code and a potential fix from the Django side.  * Jython methods are not descriptors. It seems a implementation detail. [http://code.djangoproject.com/ticket/5664 django patch]
 * Jython classes which extend dict cannot be compared to a dict. [https://sourceforge.net/tracker/index.php?func=detail&aid=1804011&group_id=12867&atid=112867 bug] [https://dev.archer.edu.au/projects/kepler/changeset/149?format=diff&new=149 django patch]
 * Jython doesn't recognize {{{__unicode__}}} methods assigned to instances.
    * But, this is the only {{{__*__}}} method where CPython allows this, and it's not documented anywhere. So, it's a implementation detail and should be fixed on Django. [http://code.djangoproject.com/ticket/5560 django patch]

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

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)