classification
Title: typing.Generic does not correctly call super().__init_subclass__
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, levkivskyi, wrmsr
Priority: normal Keywords: patch

Created on 2018-04-02 22:01 by wrmsr, last changed 2018-04-04 16:55 by levkivskyi. This issue is now closed.

Files
File name Uploaded Description Edit
generic_init_subclass.py wrmsr, 2018-04-02 22:01
Pull Requests
URL Status Linked Edit
PR 6356 merged levkivskyi, 2018-04-02 23:47
PR 6372 merged miss-islington, 2018-04-04 16:04
Messages (1)
msg314828 - (view) Author: Will T (wrmsr) Date: 2018-04-02 22:01
Per the docs ( https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ ) this should be chain-calling super but currently doesn't, and thus breaks base classes listed after it which depend on this functionality. Attached a test for a real-world usecase of mine. Originally noted in https://bugs.python.org/issue32162? but on a new ticket as requested. Thanks :)
History
Date User Action Args
2018-04-04 16:55:29levkivskyisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-04-04 16:04:48miss-islingtonsetpull_requests: + pull_request6083
2018-04-02 23:47:37levkivskyisetkeywords: + patch
stage: patch review
pull_requests: + pull_request6066
2018-04-02 22:02:33ned.deilysetnosy: + gvanrossum, levkivskyi
2018-04-02 22:01:55wrmsrcreate