New submission from Paul Ganssle <p.gans...@gmail.com>: 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: https://github.com/python/cpython/blob/8f192d12af82c4dc40730bf59814f6a68f68f950/Lib/test/test_zoneinfo/test_zoneinfo.py#L465-L487
Originally reported on the backport by Sébastien Eustace: https://github.com/pganssle/zoneinfo/issues/82 The fix in the backport is here: https://github.com/pganssle/zoneinfo/pull/83 ---------- assignee: p-ganssle components: Library (Lib) messages: 371817 nosy: p-ganssle priority: high severity: normal stage: needs patch status: open title: C implementation of ZoneInfo cannot be subclassed versions: Python 3.10, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41025> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com