On 9/20/07, Tristan King <[EMAIL PROTECTED]> wrote: > > Hi guys, > > just a quick update on the little bit of work i've been doing on this. > > i've been merging leo's code with my own, and updating my own to the > latest django svn code. > > I've been working on getting the django tutorial to work, and got up to: > --------------- > # objects.all() displays all the polls in the database. > >>> Poll.objects.all() > [<Poll: Poll object>] > -------------- > before writing this (i'm about to pack it in for the day), which threw me a > nasty error: > .......... > File "/usr/local/share/jython/Lib/django/db/models/base.py", line 101, in > __str__ > File "/usr/local/share/jython/Lib/django/utils/encoding.py", line 37, in > force_unicode > File "/usr/local/share/jython/Lib/django/db/models/base.py", line 101, in > __str__ > File "/usr/local/share/jython/Lib/django/utils/encoding.py", line 37, in > force_unicode > java.lang.StackOverflowError: java.lang.StackOverflowError > > i'll look into it tomorrow (unless someone on the other side of the world > figures it out for me :)
Oh, yeah. That's Jython's unicode(foo) calling foo.__str__ even when hasattr(foo, '__unicode__') under some circumstances. It seems that Jython expects that hasattr(type(foo), '__unicode__') too. CPython has the same requirement with __str__ , but for some reason, it doesn't with __unicode__. The very same problem affects lazy strings. > i've started using the jython trunk (2.3a0) so a few things have been > easier. So, the autoreloading bits work unchanged with Jython trunk? Excelent! > i fought a bit with the re.compile(u"([\u0080-\uffff])") bug, and ended > up just working around it with the following jython patch (i'm not sure > how else to go about it seeing that java doesn't differentiate between > signed and unsigned variables) Yep, I faced that too. But I don't know what side effects could it have. [...] > i also applied the jython patch to fix the __module__ problems. > > and that's about all for major stuff i think. Cool. Keep up the good work! And file some tickets here when you think is appropriate. -- Leo Soto M. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---