#21198: @python_2_unicode_compatible, abstract models, working on 1.4 but 
causing
infinite loop on 1.5.
-------------------------------+--------------------
     Reporter:  jpic           |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.5
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 On Django 1.4.2, I can call unicode(my_city) without any problem. my_city
 being an instance of City defined here: https://github.com/yourlabs
 /django-cities-light/blob/master/cities_light/models.py

 As you can see:

 - City inherits from Base abstract model,
 - City is decorated by @python_2_unicode_compatible,
 - Base is also decorated by @python_2_unicode_compatible,
 - Base defines __str__
 - City does not define __str__

 When these conditions are met then Django 1.5 gets stuck in an infinite
 loop. The solution is to remove @python_2_unicode_compatible decorator
 from City.

 Traceback: https://travis-ci.org/yourlabs/django-autocomplete-
 light/jobs/11953680

 I don't know if this a lack of documentation or a bug.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21198>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.be023b9e05c825ead16d4100e8fa1168%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to