#29400: mark_safe() doesn't work as a decorator for template filters and tags
---------------------------------+------------------------------------
     Reporter:  Torsten Bronger  |                    Owner:  oliver
         Type:  Bug              |                   Status:  assigned
    Component:  Template system  |                  Version:  2.0
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by Ryan Rubin):

 I went ahead and took a look, since it was 10 days past claimed. I was
 unable to reproduce for any tags, but I did for filters. As of the
 bisected commit, `inspect.getfullargspec` is being passed the function,
 but if that function is decorated, `inspect.getfullargspec` does not read
 `__wrapped__` attributes as of Python 3.4:
 https://docs.python.org/3/library/inspect.html#inspect.getfullargspec

 The function is checked for a _decorated_function attribute, but that's
 not always present. `inspect.unwrap` will get the original function for
 the call to `inspect.getfullargspec`, though. I've opened a PR here:
 https://github.com/django/django/pull/9979

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29400#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.a1b9698c6c4f6aa67b5b9b65c4c0d9e2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to