#26480: Allow sensitive_variables() to preserve the signature of its decorated
function
---------------------------------+------------------------------------
     Reporter:  tpazderka        |                    Owner:  nobody
         Type:  New feature      |                   Status:  new
    Component:  Error reporting  |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by timgraham):

 * type:  Bug => New feature
 * component:  contrib.auth => Error reporting
 * stage:  Unreviewed => Accepted


Comment:

 It might be possible to allow `sensitive_variables` to preserve the
 signature of whatever it decorates. Here's code that works until
 `@sensitive_variables` is added:
 {{{ #!python
 import inspect
 from django.views.decorators.debug import sensitive_variables

 class Backend(object):
     @sensitive_variables
     def authenticate(self, username=None, password=None):
         print(username)

 inspect.getcallargs(Backend().authenticate, username='foo',
 password='bar')
 }}}

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

Reply via email to