#2325 closed defect (fixed)
[patch] authentication framework should work with new style classes as backend.
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Contrib apps | Version: | |
Severity: | major | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The new Authentication Framework uses str() on the class to get the path of the module:
user.backend = str(backend.__class__)
First, this does absolutely not work with new style classes as backend, since there str() is different. Second, it's hackish anyway.
I set severity to major since new style classes are pretty normal, the error messages are misleading and pretty hard to debug--took me one full work day.
Attachments (1)
Change History (4)
by , 18 years ago
comment:1 by , 18 years ago
Summary: | authentication framework should work with new style classes as backend. → [patch] authentication framework should work with new style classes as backend. |
---|
I've added a patch that will support both old and new style classes, however it will probably only work for instances. Does anyone care enough about supporting class/static methods or whatever to fix that particular corner case?
comment:2 by , 18 years ago
Joseph, your patch fixes this bug as given: it is no better or worse than the previous behaviour with respect to static methods and classes. Let's drop this one in and cross the bridge for other sorts of methods when it arises. We can fix that case if/when we need to without breaking backward-compat.
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch to support new-style classes