Differences between revisions 25 and 26
Revision 25 as of 2007-09-15 05:20:30
Size: 3595
Editor: pc-112-141-104-200
Comment: Added a note about non-descriptor methods
Revision 26 as of 2007-09-15 05:21:46
Size: 3601
Editor: pc-112-141-104-200
Comment: formatting change
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:
 * Jython lists and tuples don't have __iter__ .  * Jython lists and tuples don't have {{{__iter__}}} .

Gaps between Jython and Django

Major problems

Minor annoyances

  • slice should be a type, not a function. [http://sourceforge.net/tracker/index.php?func=detail&aid=1791931&group_id=12867&atid=112867 bug]

  • PyBoolean.__tojava__ returns an Integer

    • It affects zxJDBC unless a DataHandler sets the right type of boolean parameters. Fortunately, JDBC30DataHandler does this thing, at least on my limited tests -- LeonardoSoto

  • 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.
  • Jython does not have os.getpid().

  • Jython does not have __builtins__ as a module. Django adds "_" as a convenience method for calling gettext in django/conf/__init__.py.

    • According to the Python docs, __builtins__ is a implementation detail and shouldn't be used by portable applications, so it's a Django problem. (See note about __builtins__ here: http://docs.python.org/ref/naming.html)

  • Jython methods are not descriptors. It seems a implementation datail. [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.

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__ .

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