#29642: Add check for signatures of custom error views
-------------------------------------------------+------------------------
Reporter: Adam (Chainz) Johnson | Owner: nobody
Type: New feature | Status: new
Component: Core (System checks) | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------------+------------------------
In https://github.com/django/django/pull/10249 I fixed the documentation
for the change in #24733 to add the 'exception' argument to 3 out of the 4
custom error handlers. This came from a real life problem where I'd added
handlers but without the 'exception' argument, then when the handler was
triggered, an error was raised due to it not accepting the right types.
The feedback loop for this failure is pretty long as these only get hit
when DEBUG=False and not during tests.
We should check the signatures of these handler functions with a django
check (i.e. that they accept 1 or 2 arguments, depending on which one they
are) in order to prevent this happening to others.
--
Ticket URL: <https://code.djangoproject.com/ticket/29642>
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/053.c4c3c93cbc627e1a1319f72388794fc7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.