From fe87568f0b08e2aab552410cc588663ceac33e1b Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Mon, 3 Feb 2025 16:52:04 +1100 Subject: [PATCH 1/2] PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508) * PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT * add a comment (from review) * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- include/pybind11/detail/class.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pybind11/detail/class.h b/include/pybind11/detail/class.h index f501467ded..1ed2e90c2c 100644 --- a/include/pybind11/detail/class.h +++ b/include/pybind11/detail/class.h @@ -574,9 +574,9 @@ extern "C" inline int pybind11_clear(PyObject *self) { inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) { auto *type = &heap_type->ht_type; type->tp_flags |= Py_TPFLAGS_HAVE_GC; -#if PY_VERSION_HEX < 0x030B0000 - type->tp_dictoffset = type->tp_basicsize; // place dict at the end - type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it +#if PY_VERSION_HEX < 0x030B0000 || defined(PYPY_VERSION) // For PyPy see PR #5508 + type->tp_dictoffset = type->tp_basicsize; // place dict at the end + type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it #else type->tp_flags |= Py_TPFLAGS_MANAGED_DICT; #endif From 8862cd4e7d44a78d061534223df11e586fc85847 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 21:54:30 -0800 Subject: [PATCH 2/2] chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509) Bumps the actions group with 1 update: [seanmiddleditch/gha-setup-ninja](https://github.com/seanmiddleditch/gha-setup-ninja). Updates `seanmiddleditch/gha-setup-ninja` from 5 to 6 - [Release notes](https://github.com/seanmiddleditch/gha-setup-ninja/releases) - [Commits](https://github.com/seanmiddleditch/gha-setup-ninja/compare/v5...v6) --- updated-dependencies: - dependency-name: seanmiddleditch/gha-setup-ninja dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72fb9594dc..e09540b3e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1124,7 +1124,7 @@ jobs: uses: jwlawson/actions-setup-cmake@v2.0 - name: Install ninja-build tool - uses: seanmiddleditch/gha-setup-ninja@v5 + uses: seanmiddleditch/gha-setup-ninja@v6 - name: Run pip installs run: |