-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Regression in 3.14: setting __dict__ on custom type broken (mypyc, pybind11) #133912
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
Comments
Marking as a potential release blocker. |
@markshannon, do you want to investigate, or should I? |
I'm not planning on blocking beta 2 for this, but let's try and resolve it for beta 3 -- 2025-06-17, three weeks from now. @markshannon Please can you look into it? |
Yes. Thanks for the reminder |
pythonGH-134725) (cherry picked from commit 9fbd66a) Co-authored-by: Mark Shannon <[email protected]>
Can confirm #134725 fixes the mypyc test case as well. Thanks @henryiii for providing the independent reproducer and @markshannon for the fix! For mypy / mypyc this was the last test failure for 3.14. Looking forward to |
Looks like this is done, thanks everyone! |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
The work in #115776 by @markshannon broke mypyc and pybind11's tests related to pickling and setting
__dict__
on custom types. Specially, #117750 introduced the regression for pybind11, I tested all the released for 3.14 then bisected between the commit after the fork point and 3.14.0a1 to find the commit in the PR above introduced the issue. More types are now inlined, but this breaks dict setting.I've prepared a MWE without pybind11 or mypyc:
src/main.c
pyproject.toml
CMakeLists.txt
example.py
There is custom code in
PyObject_GenericSetDict
that is supposed to be handling the inline case, but maybe it wasn't hit before and is faulty?CPython versions tested on:
3.14.0b1 (and back to 3.14.0a1)
Operating systems tested on:
macOS (and Linux in CI too; Windows CI broken due to https://gitlab.kitware.com/cmake/cmake/-/issues/26926, which I haven't opened a CPython issue for yet).
Linked PRs
PyObject_GenericSetDict
to handle inline values #134725PyObject_GenericSetDict
to handle inline values (GH-134725) #134859The text was updated successfully, but these errors were encountered: