[IronPython] Bug in Django's lazy functions

Jeff Hardy jdhardy at gmail.com
Mon Dec 29 01:41:33 CET 2008

Hi all,
I've been on the trail of this bug for months, and I think I've
finally caught a piece of it. I've uploaded a somewhat-minimal repro
to http://cid-414fa1a9bd174b4b.skydrive.live.com/self.aspx/Public/lazy_cmp.zip.
functional.py is taken from Django and is used extensively by it. The
lazy() function, in particular, has some hairy code in it to enable
lazy objects that seems to be where this problem originates.

The output of lazy_cmp.py is differsbetween IP 2.0 and Python 2.5:
>python lazy_cmp.py

>ipy lazy_cmp.py
Traceback (most recent call last):
  File "lazy_cmp.py", line 13, in lazy_cmp.py
  File "C:\Users\Jeff\Desktop\lazy_cmp\functional.py", line 191, in __wrapper__
TypeError: expected str, got Object_1$6

Hopefully the fix is simple, as this completely breaks Django's admin views.

- Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazy_cmp.zip
Type: application/zip
Size: 7249 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081228/8699802d/attachment.zip>

More information about the Ironpython-users mailing list