Opened 4 years ago
Closed 4 years ago
#31968 closed New feature (wontfix)
Handling of no auth backend failed
Reported by: | James Michael (Mike) DuPont | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | 2.2 |
Severity: | Normal | Keywords: | typecheck |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The code here checks if the auth backends support the function signature, and fails them if they do not match.
We are upgrading from 1.9 to 2.2 and encountered the issue that all the backends failed the test and no exception was raised.
I would like to propose that we track which backends were tested in an array and if that array size is zero that we raise an exception that no backend could be found for verification, this would have saved us some time.
For extra points, this test of the backend could be done at startup time and the invalid plugins could be marked on starting django instead of waiting for the time of usage. A static type check basically at load time of all plugins for compatibility.
Change History (1)
comment:1 by , 4 years ago
Easy pickings: | unset |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
You should always upgrade through each feature release incrementally (1.9 to 2.0 to 2.1 to 2.2) in such cases you wouldn't have missed deprecation warning about the
authenticate()
signature.I think it's not worth the complexity and a potential performance regression (extra check when authenticating each user). You encountered this issue because you try to bump few version at once, which is not recommended.
The Technical Board decided to don't add static typechecking to Django.