Skip to content

Pin pybind11 to 3.1.0 to match the wheel build - #259

Merged
ryanmrichard merged 2 commits into
masterfrom
pin_pybind11_internals
Sep 17, 2026
Merged

ryanmrichard merged 2 commits into
masterfrom
pin_pybind11_internals

Conversation

@ryanmrichard

Copy link
Copy Markdown
Member

Pins pybind11==3.1.0 to match NWXCMake FetchContent tag. Part of the fix for TypeError: Unregistered type : parallelzone::runtime::RuntimeView, which fails SCF Python tests on every platform.

Why

pybind11 keys its type registry on PYBIND11_INTERNALS_VERSION, baked into each extension as __pybind11_internals_v<N>_<stdlib>_<abi>__. Modules built against different N get separate registries and cannot exchange types, even though importing one from the other succeeds.

An unpinned "pybind11" let pip resolve 3.1.0 (internals v12) for local CMake builds, while NWXCMake FetchContent pinned v3.0.2 (internals v11) for the wheels. SCF test_cmake_build installs the ecosystem and then builds from source, mixing both:

TypeError: Unregistered type : parallelzone::runtime::RuntimeView
  scf.initialize(sys.argv)

Wheel-only and source-only builds each work, which is why this hid — and SCF never linked far enough to run Python tests until the libstdc++ ABI rebuild landed.

Pairs with NWChemEx/NWXCMake#92, which moves the FetchContent tag to v3.1.0. The two pins must stay in sync; a comment at each site points at the other.

🤖 Generated with Claude Code

pybind11 keys its type registry on PYBIND11_INTERNALS_VERSION, baked into each
extension as __pybind11_internals_v<N>_<stdlib>_<abi>__. Modules built against
different N get separate registries and cannot exchange types even though
importing one from the other succeeds.

An unpinned "pybind11" let pip resolve 3.1.0 (internals v12) for local CMake
builds, while NWXCMake FetchContent pinned v3.0.2 (internals v11) for the
wheels. SCF test_cmake_build installs the ecosystem then builds from source,
mixing the two, and died with:

  TypeError: Unregistered type : parallelzone::runtime::RuntimeView

Wheel-only and source-only builds both worked, which is why this hid.

Paired with the NWXCMake bump of its FetchContent tag to v3.1.0; the two pins
must stay in sync.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ryanmrichard
ryanmrichard merged commit ba2d0f4 into master Sep 17, 2026
15 checks passed
@ryanmrichard
ryanmrichard deleted the pin_pybind11_internals branch September 17, 2026 20:54
@github-actions

Copy link
Copy Markdown
Contributor

🚀 [bumpr] Bumped!
New version:v0.0.115
Changes:v0.0.114...v0.0.115

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.

1 participant