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

fix: make_static_property_type() #4971

Merged
merged 1 commit into from
Dec 14, 2023
Merged

fix: make_static_property_type() #4971

merged 1 commit into from
Dec 14, 2023

Conversation

vstinner
Copy link
Contributor

@vstinner vstinner commented Dec 13, 2023

Update make_static_property_type() to make it compatible with Python 3.13: set Py_TPFLAGS_MANAGED_DICT flag before calling PyType_Ready().

Description

Suggested changelog entry:

Update ``make_static_property_type()`` to make it compatible with Python 3.13.

Update make_static_property_type() to make it compatible with Python
3.13: set Py_TPFLAGS_MANAGED_DICT flag before calling PyType_Ready().
@vstinner
Copy link
Contributor Author

Oh. pypy-3.9 does crash:

Fatal Python error: Segmentation fault

Stack (most recent call first, approximate line numbers):
  File "/opt/hostedtoolcache/PyPy/3.9.18/x64/lib/pypy3.9/site-packages/_pytest/assertion/rewrite.py", line 354 in _rewrite_test
  File "/opt/hostedtoolcache/PyPy/3.9.18/x64/lib/pypy3.9/site-packages/_pytest/assertion/rewrite.py", line 146 in exec_module

Last week, the job passed successfully on the master branch: https://github.com/pybind/pybind11/actions/runs/7124039145/job/19397679040

So I suppose that PyPy doesn't like my change.

@rwgk
Copy link
Collaborator

rwgk commented Dec 14, 2023

From #4970:

which sets the Py_TPFLAGS_MANAGED_DICT flag after calling PyType_Ready().

That seems extremely obviously wrong (in hindsight)? — I don't think we need a reproducer for this issue.

So I suppose that PyPy doesn't like my change.

It was just a flake: I simply triggered a rerun and it worked. — I'm not sure if I've seen that exact flake before, but the successful rerun is all we need to move on here.

@rwgk rwgk merged commit 7d538a4 into pybind:master Dec 14, 2023
84 checks passed
@vstinner vstinner deleted the managed_dict branch December 14, 2023 16:27
@vstinner
Copy link
Contributor Author

It was just a flake: I simply triggered a rerun and it worked.

Oh, that's surprising, but ok. Thanks for merging my fix.

@henryiii henryiii added needs changelog Possibly needs a changelog entry and removed needs changelog Possibly needs a changelog entry labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants