Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-124520: What's New entry for ctypes metaclass __new__/__init__ change (GH-124546) #124708

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

Expand Down
Loading