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 Tim Graham)

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 Jarosław Wygoda, 7 years ago

Description: modified (diff)

comment:2 by Tim Graham, 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: UnreviewedAccepted
Type: BugCleanup/optimization
Note: See TracTickets for help on using tickets.
Back to Top