fix: Use PyObject_VisitManagedDict() of Python 3.13 (#4973)

* fix: Use PyObject_VisitManagedDict() of Python 3.13

Use PyObject_VisitManagedDict() and PyObject_ClearManagedDict() in
pybind11_traverse() and pybind11_clear() on Python 3.13 and newer.

* Add Python 3.13 CI

* tests: don't get numpy/scipy on 3.13 yet

* ci: move 3.13 to upstream

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
Victor Stinner
2023-12-15 03:42:55 +01:00
committed by GitHub
parent daea1130b4
commit dc477fac0e
4 changed files with 14 additions and 7 deletions

View File

@@ -75,7 +75,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Setup Boost (Linux)
# Can't use boost + define _

View File

@@ -13,13 +13,12 @@ concurrency:
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: ":all:"
# For cmake:
VERBOSE: 1
jobs:
standard:
name: "🐍 3.12 latest • ubuntu-latest • x64"
name: "🐍 3.13 latest • ubuntu-latest • x64"
runs-on: ubuntu-latest
# Only runs when the 'python dev' label is selected
if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
@@ -27,10 +26,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.12
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.12-dev"
python-version: "3.13"
allow-prereleases: true
- name: Setup Boost
run: sudo apt-get install libboost-dev