Inline. On 21 May 2010 15:46, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Fri, May 21, 2010 at 1:47 AM, Joe D <smilecha...@smilechaser.com> wrote: >> Has anyone had any luck running Django on IronPython ? > > Testing under IronPython hasn't been part of our regular testing > regimen, so I can't comment on the level of compatibility. > >> This seems to have been reported to the IronPython team here: >> >> http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=27007 >> >> but the response was that it is a deficiency within Django. > > My immediate reaction is that if IronPython doesn't behave like > CPython on a basic datatyping issue, it's a deficiency in IronPython, > not a problem with Django.
The crux of the issue is that in IronPython, the str type and the unicode type are the same thing (they're both unicode aware), i.e. >>> str == unicode True >>> str <type 'str'> >>> unicode <type 'str'> On CPython, they aren't, i.e. >>> str == unicode False >>> str <type 'str'> >>> unicode <type 'unicode'> > That said, we've made minor changes to Django in order to support > Jython and PyPy in (mostly changes avoiding certain CPython-specific > assumptions about PYTHONPATH and garbage collection strategies), so > I'm not opposed to making similar minor changes in order to > accommodate IronPython. Not sure whether or not a check for the above special case is considered a 'minor change'. > However, I'm not an IronPython expert myself, and IronPython > compatibility is a pretty low personal priority. What is needed is > someone who understands IronPython who is sufficiently enthused to do > the work. Volunteers welcome. Joe, try changing line 178-179 to - cls._delegate_str = str != unicode and str in resultclasses cls._delegate_unicode = str == unicode or unicode in resultclasses And see if it runs properly (I haven't tested it because I don't have the IronPython environment set up with Django). There may be (in fact, likely to be) other errors as well. When I get a chance, I'm happy to track these things down and submit a patch. Won't be until late June or July though. Some relevant IronPython work items - http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=27007 http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=15372 > Yours, > Russ Magee %-) > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.