* chore: add prepare-release and publish-release agent skills
Split the release process from docs/release.rst into two agent skills:
a changelog/version-bump PR, and the manual publication steps after
that PR merges. Un-ignore .agents (the MSVC 'Release' pattern matched
the release skill directory case-insensitively) and drop the outdated
manual _version.py step from docs/release.rst.
Assisted-by: ClaudeCode:claude-fable-5
* [no ci] chore: document changelog style normalization in release skill
Teach the prepare-release skill to proofread generated changelog entries for tense, concision, categorization, and PR-link consistency before opening release-prep PRs.
* [no ci] chore: fix release skill portability
* [no ci] fix: harden release workflows
* [no ci] docs: show explicit manual artifact upload
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
* chore(cmake): carry option-driven defines on pybind11_headers INTERFACE
PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION and
PYBIND11_SIMPLE_GIL_MANAGEMENT were directory-scoped
add_compile_definitions, which only reached the master-project test
build. On the pybind11_headers INTERFACE (like
PYBIND11_INTERNALS_VERSION) they also apply in add_subdirectory mode
and in the exported/installed targets.
Assisted-by: ClaudeCode:claude-fable-5
* test(cmake): verify option-driven defines reach consumer targets
Extend subdirectory_target and installed_target to check that
PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION and
PYBIND11_SIMPLE_GIL_MANAGEMENT propagate through the pybind11_headers
usage requirements. Fails without the parent commit.
Assisted-by: ClaudeCode:claude-fable-5
* fix: returning a copyable type with a deleted move constructor (#6142)
detail::function_ref's constructor SFINAE required
is_convertible<Ret, Ret>, which is false for a copyable type whose move
constructor is explicitly deleted (the trait tests conversion from an
xvalue). In C++17, such a prvalue return is legal via guaranteed copy
elision, so also accept an exact type match. Regression introduced in
3.1.0 by the call_impl outlining (#5887).
Fixes#6142
Assisted-by: ClaudeCode:claude-fable-5
* refactor: guard with __cpp_guaranteed_copy_elision
Per review: the feature-test macro expresses the intent more precisely
than PYBIND11_CPP17.
Assisted-by: ClaudeCode:claude-opus-5
* docs: add 3.1 entries to the changelog
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
* chore: prepare 3.1.0 release
Assisted-by: ClaudeCode:claude-opus-5
* [skip ci] Change release date to August 4, 2026
* docs: add #6127 entry and set release date to August 6, 2026
Assisted-by: ClaudeCode:claude-opus-5
---------
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
* feat!: drop support for Python 3.8
The minimum supported version is now Python 3.9. pybind11 v3.0 was the last
release that supports Python 3.8. The deprecation note said that support goes
away in 3.1.
Remove the code paths that this makes dead:
- the `_PyObject_Vectorcall` fallback in `cast.h`
- the `frame->f_code` and `frame->f_back` fallbacks in `pytypes.h`
- the `PyFrame_FastToLocals` path in `get_type_override`
- the conditional `Py_VISIT(Py_TYPE(self))` in `tp_traverse`
- `PYBIND11_PYCONFIG_SUPPORT_PY_VERSION_HEX`, the pre-PyConfig interpreter
init, and the `widen_chars` helpers in `embed.h`
Assisted-by: ClaudeCode:claude-opus-5
* ci(appveyor): use Python 3.9
The AppVeyor job set `PYTHON: 38`, which makes the path `C:\Python38`.
The image gives Python 3.9.13 as `C:\Python39`.
Assisted-by: ClaudeCode:claude-opus-5
* feat!: require MSVC 2019 or newer
Python 3.9 is the new minimum, so MSVC 2017 is no longer needed. Raise the
compile-time floor to _MSC_VER 1920 and remove the workarounds that only
applied below it: std::launder, fold expressions, weak_from_this, aligned
new/delete, the C4100 warning helper, and the func_handle syntax error.
AppVeyor now builds with Visual Studio 2019.
Assisted-by: ClaudeCode:claude-opus-5
* fix(appveyor): build against the Python that has the test packages
CMake 4 has no FindPythonLibs, so pybind11 uses FindPython. FindPython reads
the registry before PATH and selected `C:\Python314-x64`, but the test packages
go into the Python on PATH. Pass `Python_ROOT_DIR` to name the correct one.
Also set `CMAKE_ARCH`. It was never set, so the architecture came from the
generator. Visual Studio 2017 defaults to Win32, but Visual Studio 2019
defaults to x64, which made this x86 job build 64-bit code.
Assisted-by: ClaudeCode:claude-opus-5
* fix(appveyor): give the linker Python's libs directory
The build compiled but failed to link with LNK1104 on a bare `python39.lib`.
That name comes from the `#pragma comment(lib, ...)` in pyconfig.h, so the
linker needs the directory. CMake 4 has no FindPythonLibs, and FindPython does
not add it for this Debug x86 build. Put it on LIB instead.
The directory listing is temporary, to confirm the library is present.
Assisted-by: ClaudeCode:claude-opus-5
* fix(appveyor): link the release Python library in Debug
The image ships python39_d.lib next to python39.lib, so FindPython picks the
debug import library for a Debug build. pybind11 undefines _DEBUG around
Python.h, so pyconfig.h asks for python39.lib instead and the link failed with
LNK1104. Name the release library for the debug slot.
Setting LIB does not work, because MSBuild replaces it from the toolset, and it
would link both import libraries.
Assisted-by: ClaudeCode:claude-opus-5
* chore(appveyor): print link settings to debug LNK1104
Revert the two attempted fixes. Neither changed the failure: setting LIB does
not survive MSBuild, and naming the release library for Python_LIBRARY_DEBUG
had no effect.
Print the Python cache entries and the link settings of a generated project
file instead, to see what the linker really gets. Temporary.
Assisted-by: ClaudeCode:claude-opus-5
* fix(appveyor): take the release Python library in Debug
The generated project file linked C:\Python39\libs\python39_d.lib in the Debug
configuration, because the image ships debug binaries next to the release ones.
pybind11 undefines _DEBUG around Python.h, so pyconfig.h asks for python39.lib
in a #pragma comment(lib), which nothing on the link line satisfies and no
library directory holds. Map Debug to the release artifacts.
Assisted-by: ClaudeCode:claude-opus-5
* chore(appveyor): drop the temporary link diagnostic
Assisted-by: ClaudeCode:claude-opus-5
* fix(tests): guard the unraisable warning filter for pytest < 6
The distro pytest in the Clang and GCC Docker jobs has no
PytestUnraisableExceptionWarning, so an unconditional filterwarnings
mark makes pytest fail with an INTERNALERROR after the tests pass.
Assisted-by: ClaudeCode:claude-opus-5
Claude-Session: https://claude.ai/code/session_01Aimf6HuSz1vLRwBnbxmCTc
* docs: address review items on version hints, embed docs, and a PyPy xfail
Extend Python_ADDITIONAL_VERSIONS through 3.15, describe the PyConfig
behavior of initialize_interpreter, and drop the stale Python 3.8 wording
from the PyPy xfail reason.
Assisted-by: ClaudeCode:claude-opus-5
* Update README.rst
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
* feat: small command line helpers for quick tests
Add --cflags, --ldflags, --embed, and --file to the pybind11 command
line tool, based on python-config. This makes quick one-off compiles
easy:
c++ $(python3 -m pybind11 --file=example.cpp)
Assisted-by: ClaudeCode:claude-fable-5
* refactor: quote paths, clarify CLI output logic, strengthen tests
- Quote include and library dirs in get_cflags/get_ldflags so paths with
spaces work, sharing one quote helper in commands.py
- Restructure the --file/--cflags/--ldflags printing into a single print
- Note the Unix-compiler orientation in help text and docs
- Test -L presence for --embed and quoting of paths with spaces
Assisted-by: ClaudeCode:claude-fable-5
* refactor: simplify flag helpers and keep import pybind11 light
- Replace _get_config_var(name, fmt, quote) with a plain _config(name)
string helper; formatting and quoting happen at the call sites
- Defer sysconfig/shlex imports so import pybind11 does not pay for the
CLI (~1ms -> ~0.08ms for pybind11.commands)
- Fetch EXT_SUFFIX once in main()
- Import commands normally in the quoting test instead of importlib
file loading
Assisted-by: ClaudeCode:claude-fable-5
* fix: shared-library flags on all Unix platforms
The --file/--ldflags output only added -shared and -fPIC on Linux, so
other Unix platforms (FreeBSD, Solaris, AIX) linked an executable and
failed on the missing main. Gate on os.name instead.
Assisted-by: ClaudeCode:claude-opus-5
2026-07-31 14:17:21 -04:00
Henry Schreinerandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* tests: add linking warnings/error
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: check pedantic C++14
* fix: some pedantic warnings
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* feat: add py::mod_gil_used()
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: use not_supported()
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* style: pre-commit fixes
* Update CMakeLists.txt
* fix: remove the true/false parameter from mod_gil_not_used
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* style: pre-commit fixes
* Update tests/CMakeLists.txt
* fix: deprecate mod_gil_not_used(bool) instead of removing it
Keep the bool constructor public and mark it deprecated, so existing
code that spells mod_gil_not_used(false) still compiles. mod_gil_used()
now sets the flag through its friendship, which keeps the deprecated
constructor the only bool overload and stops pybind11 warning against
itself.
Also use the py:: alias in exo_planet_pybind11.cpp to match its sibling
home_planet_very_lonely_traveler.cpp.
Assisted-by: ClaudeCode:claude-opus-5
* fix: add trailing comma to macros picked up in rebase
test_smart_ptr.cpp and standalone_enum_module.cpp came from master after
this branch was written, so they still invoked variadic macros with no
variadic argument. That is a pedantic error below C++20.
Assisted-by: ClaudeCode:claude-opus-5
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* revert: "revert: add life support to handles cast to string_view (#6092)"
This re-applies #6092 (reverting #6097) so the follow-up fixes in this PR can build on it.
Assisted-by: ClaudeCode:claude-opus-4.8
* fix: don't throw from string_view life support outside a bound function
PR #6092 added loader_life_support::add_patient(src) to keep the source
object alive when loading a string view, fixing a real use-after-free when
a container of views is built from a non-sequence iterable (e.g. a
generator): list_caster materializes a temporary tuple that owns the
strings and destroys it when load() returns, before the bound function
body runs.
add_patient throws when there is no life support frame, so casting to a
view outside a bound function (e.g. a manual py::cast<std::string_view>)
now raises instead of relying on the caller-owned source, a regression
from #6092.
For these view-into-src cases registration is best effort: inside a bound
function it keeps src alive (fixing the UAF), and outside one the caller
owns src's lifetime as before. Add try_add_patient(), which returns false
instead of throwing when there is no frame, and use it at the three view
load sites. add_patient() keeps its strict contract for value-creating
conversions.
Assisted-by: ClaudeCode:claude-opus-4.8
* fix: only add string_view life support for transient sources
Refine the previous commit. Best-effort registration (try_add_patient)
silently produces a dangling view when a container of views is built from
a generator outside a bound function: there the materialized temporary is
released before the view is used, and with no frame nothing keeps it
alive. Such a cast cannot be made safe, so it should fail loudly, while a
view into a durable, caller-owned object needs no life support at all.
The view caster cannot tell a durable source from a pybind11-managed
transient one; that provenance lives in the container caster. Introduce an
ambient transient_source_guard that the list, set, map, and array casters
set around their generator/materialized paths, and have the string caster
keep the source alive only when loading from a transient source (via the
throwing add_patient, so try_add_patient is no longer needed). This means:
- views into durable sources (direct arguments, sequences, manual casts)
add no life support and no longer throw outside a bound function, and
- a generator used outside a frame throws, rather than silently dangling.
The guard restores (rather than clears) the previous value, so a durable
container nested in a transient one is correctly treated as transient.
Verified with AddressSanitizer: the in-frame generator case is clean, the
out-of-frame durable cases succeed, and the out-of-frame generator case
throws.
Assisted-by: ClaudeCode:claude-opus-4.8
* Revert "fix: only add string_view life support for transient sources"
This reverts commit e18b8346a2.
* test: cover string_view argument life support
* test: cover generated and nested string_view lifetimes
* test: cover temporary-backed string_view casts
* test: explain string_view lifetime regression tests
* docs: clarify string_view lifetime requirements
* docs: explain life support for custom view casters
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
* fix(cmake): respect explicit PYBIND11_USE_CROSSCOMPILING under CMP0190
PR #5829 added `AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR` to the
condition setting `_PYBIND11_CROSSCOMPILING`. That gate was meant to only
control the auto-default of `PYBIND11_USE_CROSSCOMPILING`, but it ended up
overriding a value the project set explicitly. Emscripten/Pyodide defines
`CMAKE_CROSSCOMPILING_EMULATOR` (node) yet still wants cross-compiling
mode, so the flag was forced OFF and the build failed with a spurious
"Cannot run the interpreter" / pointer-size mismatch.
Move the emulator check up so it only guards the auto-default, and never
override an explicitly set `PYBIND11_USE_CROSSCOMPILING`.
Fixes#6043
Assisted-by: ClaudeCode:claude-opus-4.8
* fix(cmake): keep CMP0190 auto-default in add_subdirectory builds
The previous commit's `NOT DEFINED PYBIND11_USE_CROSSCOMPILING` guard
broke the intended auto-default for top-level / add_subdirectory builds:
CMakeLists.txt runs `option(PYBIND11_USE_CROSSCOMPILING ... OFF)` before
including pybind11Common.cmake, so the variable is already defined (OFF)
and the CMP0190 default never applied.
Capture, before the option() call, whether the project set the value
itself, and let pybind11Common.cmake apply its default unless the value
was set explicitly. This keeps both the emulator override fix and the
CMP0190 auto-default for subdirectory consumers.
Assisted-by: ClaudeCode:claude-opus-4.8
GCC on macOS has no linker plugin, so `-fno-fat-lto-objects` makes every
LTO probe fail and LTO is silently disabled. Plain `-flto=auto` works.
Fixes#6060
Assisted-by: ClaudeCode:claude-opus-5
Claude-Session: https://claude.ai/code/session_013JABmnjt9oAh29p1pytAB3
* fix: include `complex` in std::complex input annotation
The input annotation for `std::complex<T>` omitted the builtin `complex`
type, which typeshed only makes a `typing.SupportsComplex` on Python 3.11+.
Assisted-by: ClaudeCode:claude-opus-5
Claude-Session: https://claude.ai/code/session_013JABmnjt9oAh29p1pytAB3
* Add comment to explain why the explicit `complex` is needed.
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
`WORKAROUND_ENABLING_ROLLBACK_OF_PR3068` compared the 5-element
`sys.version_info` tuple to `(3, 9)`, so it was always False. The guarded
branch never ran. Remove the constant and keep only the branch that runs.
Assisted-by: ClaudeCode:claude-opus-5
* fix(stl_bind): correct __delitem__ for negative-step slices and re-enable contiguous erase fast path
The slice __delitem__ binding advanced the erase index by step - 1 for
all steps. That correction is only valid for positive steps, where
erasing shifts later elements down by one. For negative steps the
visited indices are strictly decreasing and erasing never shifts them,
so the extra -1 deleted the wrong elements (e.g. del v[::-2] on
[0,1,2,3] yielded [1,2] instead of [0,2]) and del v[::-1] walked off the
front of the vector (v.begin() - 1, observed SIGBUS).
Switch to the signed slice::compute overload so negative steps stay
signed, advance by step for negative steps and step - 1 for positive
ones, and drop the && false that had disabled the O(n) contiguous fast
path since 2016.
Assisted-by: ClaudeCode:claude-fable-5
* refactor: address review — static_cast and parametrized test
Use static_cast instead of a C-style cast for the slice.compute() size
argument, and convert the __delitem__ slice test to
pytest.mark.parametrize over the slice cases.
Assisted-by: ClaudeCode:claude-fable-5
* test(stl_bind): cover slice deletion edge cases
* fix(stl_bind): erase strided slices in descending order
* Eliminate a variable and avoid redundant index increment (i + 1, ++i).
The control flow handles all relevant boundaries:
- slicelength == 0: excluded by the outer guard.
- slicelength == 1: erases once, decrements to zero, and breaks without touching start.
- Larger slices: updates start exactly when another erase remains.
- slicelength cannot underflow because the loop exits when it reaches zero.
- Mutating slicelength is harmless because it is not used afterward.
- The potentially dangerous final start += step remains eliminated.
It also removes the separate loop counter. The compiler would probably
optimize the former i + 1, ++i mechanics away, but the new source expresses
the real state more directly: "number of erasures remaining."
The unconditional while (true) is safe because entry is strictly guarded by
slicelength > 0, and the decrement guarantees eventual termination.
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Remove ten jobs whose coverage is already provided by other jobs:
duplicate ubuntu pypy/graalpy/3.11/3.14t runs, an intel-mac 3.11
smart_holder run, a windows job pinning the default MSVC runtime,
sandwiched clang 14 and gcc 10/C++20 entries, and extra win32 and
win32-debug variants. Also delete the gcc PYBIND11_TEST_OVERRIDE steps,
dead since gcc 12 left the matrix (the windows-2022 job still runs the
same exercise).
Assisted-by: ClaudeCode:claude-fable-5
* fix(ci): pin the discovered Python to the venv/setup-python interpreter
The manylinux/musllinux images added Python 3.15 and dropped 3.13t;
FindPython's version scan then picked /usr/local/bin/python3.15 over
the uv-created venv (Python_ROOT_DIR is only a hint). Similarly, the
macOS and Windows 3.14t jobs picked a system 3.14 over setup-python's
free-threaded interpreter. Pin the interpreter explicitly in both
places, and drop the 3.13t manylinux jobs.
Assisted-by: ClaudeCode:claude-fable-5
* ci: use setup-python's python-path output instead of a locate step
Assisted-by: ClaudeCode:claude-fable-5
* Apply suggestions from code review
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
When the Python executable changes between CMake runs,
PYTHON_MODULE_DEBUG_POSTFIX was not being unset alongside PYTHON_IS_DEBUG
and PYTHON_MODULE_EXTENSION, allowing a stale postfix to survive interpreter
changes.
In the USE_PYTHON_INCLUDE_DIR block, the elseif branch checked
PYTHON_INCLUDE_DIR (singular) but expanded PYTHON_INCLUDE_DIRS (plural),
always silently resolving to an empty string. Correct it to expand
${PYTHON_INCLUDE_DIR}. Also add a Python3_INCLUDE_DIRS branch so the
option works when pybind11NewTools resolves Python via the Python3
find-package component.
Assisted-by: ClaudeCode:claude-fable-5
* ci: update cibuildwheel to v4.1 and pyodide to 314
Bump pypa/cibuildwheel from v3.4 to v4.1 across the Pyodide, iOS, and
Android jobs. Move the Pyodide build to cp314-pyodide_wasm32
(pyodide 314.0.0).
Drop the iOS CIBW_SKIP: cp314-* workaround now that pypa/cibuildwheel#2494
is resolved.
Assisted-by: ClaudeCode:claude-opus-4.8
* test: xfail array resize on numpy<2.4 + Python 3.14
Removing the cp314 iOS skip surfaced a pre-existing numpy bug, not a
cibuildwheel regression: numpy<2.4 has a resize(refcheck=True) regression
on Python 3.14 where the reference held by the bound function isn't
detected, so a resize that should raise instead succeeds and the later
reshape rejects the non-square size. Fixed in numpy>=2.4, but the iOS test
environment has no numpy wheel newer than 2.3.5.post1, so xfail the test
for that specific combination.
Assisted-by: ClaudeCode:claude-opus-4.8
* test: link numpy resize aliasing issue and trim comment
iOS numpy wheels updated to 2.5.0, so the xfail is a general numpy<2.4 +
Python 3.14 guard rather than iOS-specific. Reference numpy/numpy#30265.
Assisted-by: ClaudeCode:claude-opus-4.8
This reverts commit 59d7cb28c1 (#6092).
#6092 introduced regressions that are being addressed in #6096; reverting
Assisted-by: ClaudeCode:claude-opus-4.8
`load_src` was a Python 2-era leftover. A removed branch used to reassign
it to a temporary unicode object; since that was deleted with Python 2
support, it is now an exact, never-reassigned alias of `src`. Use `src`
directly.
Spotted in review of #6092.
Assisted-by: ClaudeCode:claude-opus-4.8
Under free-threaded CPython (Py_GIL_DISABLED) the GIL provides no mutual
exclusion, so the plain pointer last_storage_ptr_ was read and written
concurrently without synchronization, a C++ data race. Make it a
std::atomic<T *>.
Also reorder get_stored() to check is_last_storage_valid() before loading
the cached pointer. The writer publishes the pointer before setting the
validity flag, so the flag must be observed first for correct
acquire/release ordering.
Assisted-by: ClaudeCode:claude-fable-5
Remove the module-level `cpp_flag_cache = None` variable and its stale
comment "Every call will cache the result". The actual caching is handled
by the `@lru_cache` decorator on `auto_cpp_level` directly below.
Also rename the typo'd parameter `obg` to `obj` in `no_recompile`.
Nothing passes this argument by keyword, so there is no API break.
Part of #6084
Assisted-by: ClaudeCode:claude-sonnet-4-6
The `# -*- coding: utf-8 -*-` line prepended to every string passed to
PyRun_String was a Python 2 workaround. Python 3's PyRun_String already
assumes UTF-8 source encoding, so the cookie is dead weight — and
harmful: it shifts all line numbers up by one in tracebacks and
SyntaxErrors from evaluated code (a `raise` on line 2 would incorrectly
appear as line 3).
Remove the cookie and replace the stale comment with one that explains
the actual reason for the `std::string` conversion (need a C string for
PyRun_String). No other location in eval.h uses this pattern
(eval_file reads directly from a FILE*).
Assisted-by: ClaudeCode:claude-fable-5
* ci: drop boost from 32-bit mingw32 install
MSYS2 removed the mingw-w64-i686-boost package (32-bit i686 is being
phased out), so the mingw32 matrix entry now fails at the pacman install
step with "target not found: mingw-w64-i686-boost". Boost is optional
test coverage (boost::optional / boost::variant casters, gated behind
PYBIND11_TEST_BOOST); without it those tests are skipped and the rest of
the job builds and runs normally. Move boost to the mingw64 extra_install
so the 64-bit job keeps that coverage.
Assisted-by: ClaudeCode:claude-opus-4.8
* Apply suggestion from @henryiii
* ci: update GraalPy from 24.2 to 25.0 (Python 3.12 based)
- Replace graalpy-24.2 with graalpy-25.0 in CI matrix
- Replace graalpy-24.1 with graalpy-24.2 (shift older version up)
- Remove dead GRAALPY_VERSION < (24, 2) xfail guards from tests
- Remove unused GRAALPY_VERSION from tests/env.py
- Update internals.h comment to reference v25.0
Assisted-by: OpenCode:glm-5
* fix: use numpy 2.2.x for GraalPy 3.12 (graalpy312 wheels)
numpy 1.26.x only has graalpy311 wheels; GraalPy 25.0 (Python 3.12)
requires numpy 2.2.x which has graalpy312 wheels on the GraalVM index.
Assisted-by: OpenCode:glm-5
* fix: simplify numpy requirement for GraalPy (drop 3.11 branch)
We no longer test GraalPy 3.11, so the version split is unnecessary.
Assisted-by: OpenCode:glm-5
Created using [mini-swe-agent](https://mini-swe-agent.com) and the propmt:
I'd like to find usages of PYBIND11_MODULE in the docs folder and add py::mod_gil_not_used() as a third argument if there ar
e only two arguments. These are examples, and it's really a good idea to always include that now.
I removed a few of the changes.
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* feat: scoped_critical_section
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* refactor: pull out to file
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* style: pre-commit fixes
* fix: GIL code in some compilers
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: move to correct spot
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* ci: support Python 3.14
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: Python 3.14 name change
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: fix expected output to handle Python 3.14
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: tighten CLI and add color on 3.14+
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: ignore failure on 3.14.0b1
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: support Python 3.14.0b1 with interperters
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update test_multiple_interpreters.py
* Update test_multiple_interpreters.py
* fix: new breakage for 3.14 fixed
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: handle empty annotations 3.14
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: Python 3.14 may not create the annotations dict
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: use PyUnstable_IsImmortal
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: use sys._is_immortal
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: ignore large values for refcount too
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* style: pre-commit fixes
* ci: enable all free-threaded builds
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: patch for embed
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Revert "fix: patch for embed"
This reverts commit c4226a0671.
* ci: drop new 3.xt additions
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: logic issue, also add some comments
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update include/pybind11/pytypes.h
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* ci: speed up ci a bit by thinning out matrix
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update configure.yml
* Update configure.yml
* Update configure.yml
* ci: drop third build
* ci: fix minor issues
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* ci: trim a bit more
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* feat: drop PYBIND11_NUMPY_1_ONLY
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Add #error "PYBIND11_NUMPY_1_ONLY is no longer supported." in pybind11/numpy.h
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>