Title: C implementation of ZoneInfo cannot be subclassed
Type: Stage: patch review
Components: Library (Lib) Versions: Python 3.10, Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: p-ganssle Nosy List: p-ganssle
Priority: high Keywords: patch

Created on 2020-06-18 14:26 by p-ganssle, last changed 2020-06-18 14:41 by p-ganssle.

Pull Requests
URL Status Linked Edit
PR 20965 open p-ganssle, 2020-06-18 14:41
Messages (1)
msg371817 - (view) Author: Paul Ganssle (p-ganssle) * (Python committer) Date: 2020-06-18 14:26
In the C implementation of zoneinfo.ZoneInfo, __init_subclass__ is not declared as a classmethod, which prevents it from being subclassed. This was not noticed because the tests for ZoneInfo subclasses in C are actually testing zoneinfo.ZoneInfo, not a subclass, due to a mistake in the inheritance tree:

Originally reported on the backport by S├ębastien Eustace:

The fix in the backport is here:
Date User Action Args
2020-06-18 14:41:21p-gansslesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request20143
2020-06-18 14:26:51p-gansslecreate