diff options
author | Petr Viktorin <encukou@gmail.com> | 2024-09-27 20:13:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 20:13:53 (GMT) |
commit | 3387f76b8f0b9f5ef89f9526c583bcc3dc36f486 (patch) | |
tree | fca50fdc33fb3b2b09bd8137a3e6fd70a6a749cb /Doc | |
parent | d8cf587dc749cf21eafc1064237970ee7460634f (diff) | |
download | cpython-3387f76b8f0b9f5ef89f9526c583bcc3dc36f486.zip cpython-3387f76b8f0b9f5ef89f9526c583bcc3dc36f486.tar.gz cpython-3387f76b8f0b9f5ef89f9526c583bcc3dc36f486.tar.bz2 |
gh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.13.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 4581779..52fe749 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -824,6 +824,24 @@ copy (Contributed by Serhiy Storchaka in :gh:`108751`.) +ctypes +------ + +* As a consequence of necessary internal refactoring, initialization of + internal metaclasses now happens in ``__init__`` rather + than in ``__new__``. This affects projects that subclass these internal + metaclasses to provide custom initialization. + Generally: + + - Custom logic that was done in ``__new__`` after calling ``super().__new__`` + should be moved to ``__init__``. + - To create a class, call the metaclass, not only the metaclass's + ``__new__`` method. + + See :gh:`124520` for discussion and links to changes in some affected + projects. + + dbm --- |