#19928: python_2_unicode_compatible breaks Python 2
-------------------------------------+-------------------------------------
Reporter: vernondcole | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: master
Severity: Normal | Resolution: invalid
Keywords: porting to python 3 | Triage Stage:
Has patch: 0 | Unreviewed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by msopacua):
* cc: m.r.sopacua@… (added)
Comment:
I'd like to reopen this issue or create a new one for expanding the
documentation. It's very slim on the whole __str__ method in python 2 and
specifically doesn't deal with abstract classes. I just spent quite a bit
of time debugging this issue, where I had the __str__() method defined in
the abstract class and repeated the decorator on derived classes. I'm
guessing this is the error and somehow things get screwed when doing it
like that. No matter what I returned in the abstract class I got the
recursion error. When I finally reimplemented the method in the derived
class and gave back a simple string literal, things went ok.
I'm still figuring out how to deal with it, cause what I really want to
return is a property of a foreign key.
Anyway, reopen this, or create a new one?
--
Ticket URL: <https://code.djangoproject.com/ticket/19928#comment:2>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.d57ee3c5e4844c5f5037be34ee3774e4%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.