Opened 7 years ago

Closed 7 years ago

#28695 closed Cleanup/optimization (fixed)

Allow models to use __init_subclass__

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 (3)

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

comment:3 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 399a8db3:

Fixed #28695 -- Allowed models to use init_subclass().

Note: See TracTickets for help on using tickets.
Back to Top