Opened 7 years ago
Last modified 7 years ago
#28695 closed Cleanup/optimization
Allow models to use __init_subclass__ — at Version 2
Reported by: | Jarosław Wygoda | Owned by: | Jarosław Wygoda |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.11 |
Severity: | Normal | Keywords: | ModelBase __init_subclass__ |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Per PEP 0487, ModelBase
must pass kwargs to type.__new__
in order to enable __init_subclass__
in Python 3.6.
Change History (2)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|---|
Has patch: | set |
Summary: | Make ModelBase.__new__ pass **kwargs to type.__new__ → Allow models to use __init_subclass__ |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
Note:
See TracTickets
for help on using tickets.
PR