-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Change function calls to use vectorcall #5948
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 418a034.
It cannot re-use the incoming tuple as before, because it is no longer a tuple at all. So a new tuple must be created, which then holds references for each member.
This would be easier with `if constexpr`
|
@b-pass I merged master, which had no conflicts. My idea was that maybe Cursor can figure out the root cause for these two CI failures:
I'll wait for this CI run to finish, to see if these errors appear again. When testing locally with Python 3.14.2, default and freethreaded, I saw this error (with both builds): I'm attaching the full build & test logs, JIC. I switched back to master, everything else being equal, this error didn't appear. So it's definitely somehow connected to this PR. pybind11_gcc_v3.14_df793163d58_default_tests_log_2025-12-26+193154.txt pybind11_gcc_v3.14_df793163d58_freethreaded_log_2025-12-26+193608.txt |
The `mod_per_interpreter_gil`, `mod_shared_interpreter_gil`, and `mod_per_interpreter_gil_with_singleton` modules were being built but not installed into the wheel when using scikit-build-core (SKBUILD=true). This caused iOS (and potentially Android) CIBW tests to fail with ModuleNotFoundError. Root cause analysis: - The main test targets have install() commands (line 531) - The PYBIND11_MULTIPLE_INTERPRETERS_TEST_MODULES were missing equivalent install() commands - For regular CMake builds, this wasn't a problem because LIBRARY_OUTPUT_DIRECTORY places the modules next to pybind11_tests - For wheel builds, only targets with explicit install() commands are included in the wheel This issue was latent until commit fee2527 changed the test imports from `pytest.importorskip()` (graceful skip) to direct `import` statements (hard failure), which exposed the missing modules. Failing tests: - test_multiple_interpreters.py::test_independent_subinterpreters - test_multiple_interpreters.py::test_dependent_subinterpreters Error: ModuleNotFoundError: No module named 'mod_per_interpreter_gil'
|
Quick update: I think Cursor found the root cause for the CIBW / iOS failures, and a fix. I'm still looking into why we're not seeing the |
Add numpy==2.4.0 requirement for Python 3.14 (both default and free-threaded builds). NumPy 2.4.0 is the first version to provide official PyPI wheels for Python 3.14: - numpy-2.4.0-cp314-cp314-manylinux_2_27_x86_64...whl (default) - numpy-2.4.0-cp314-cp314t-manylinux_2_27_x86_64...whl (free-threaded) Previously, CI was skipping all numpy-dependent tests for Python 3.14 because PIP_ONLY_BINARY was set and no wheels were available: SKIPPED [...] test_numpy_array.py:8: could not import 'numpy': No module named 'numpy' With this change, the full numpy test suite will run on Python 3.14, providing better test coverage for the newest Python version. Note: Using exact pin (==2.4.0) rather than compatible release (~=2.4.0) to ensure reproducible CI results with the first known-working version.

Description
Change both the Python->C++ and the C++->Python function calls to use the faster "vector call" calling protocol.
This makes function calls faster, at the minor expense of having to handle the arguments slightly differently.
Suggested changelog entry: