#21733: @python_2_unicode_compatible causes infinite recursion when module
imported
more than once
---------------------------+--------------------------------------
Reporter: ntucker | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Comment (by ntucker):
Hmm, I'm getting multiple imports because I do from .models import
Whatever in the application, then at other places from application.models
import whatever.
I also put my models in their own modules, and package them up so
__init__.py has from .whatever import *
I don't see any way of avoiding these different import styles
As far as setting an attribute on __str__; I tried this and it would not
allow it saying
{{{
AttributeError: 'instancemethod' object has no attribute '__secrettest'
}}}
when I try to
{{{
setattr(klass.__str__, '__secrettest', True)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21733#comment:4>
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/065.45479853f8b988d7083dbc133a64dd38%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.