#26480: Allow sensitive_variables() to preserve the signature of its decorated
function
-------------------------------------+-------------------------------------
Reporter: tpazderka | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: assigned
Component: Error reporting | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Baptiste Mispelon):
* owner: nobody => Baptiste Mispelon
* status: new => assigned
* has_patch: 0 => 1
* type: New feature => Cleanup/optimization
Comment:
I've looked into this and it turns out the issue lies with
`inspect.getcallargs` which doesn't follow the `__wrapped__` attribute set
by `functools.wraps()`.
Using `inspect.signature(...).bind(...)` instead of
`inspect.getcallargs(...)` fixes the issue (as an added bonus,
`getcallargs()` has been deprecated since Python 3.5 so removing it is a
plus).
[https://github.com/django/django/pull/12198 PR here]
--
Ticket URL: <https://code.djangoproject.com/ticket/26480#comment:7>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.4de5b483bca523ad32bd873f2d01e7c4%40djangoproject.com.