pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.08k stars 2.05k forks source link

[smart_holder] Fix terrible merge accident: `PYBIND11_INTERNALS_SH_DEF` missing in `PYBIND11_INTERNALS_ID` and `PYBIND11_MODULE_LOCAL_ID` #5159

Closed rwgk closed 2 weeks ago

rwgk commented 2 weeks ago

Description

This PR fixes two oversights:

  1. A terrible merge accident introduced with pybind/pybind11#5085: PYBIND11_INTERNALS_SH_DEF was accidentally removed from PYBIND11_INTERNALS_ID and PYBIND11_MODULE_LOCAL_ID. — How did this happen? First PR #5084 on master introduced whitespace changes:

Those were incorrectly applied in smart_holder PR #5085:

  1. Simple change that was overlooked before: missing -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" (manylinux)

Validation of both fixes:

ci.yml manylinux:

C++ Info: 13.2.1 20231014 C++17 __pybind11_internals_v5_gcc_libstdcpp_cxxabi1018__ PYBIND11_SIMPLE_GIL_MANAGEMENT=False PYBIND11_NUMPY_1_ONLY=False

ci_sh_def.yml manylinux:

C++ Info: 13.2.1 20231014 C++17 __pybind11_internals_v5_gcc_libstdcpp_cxxabi1018_sh_def__ PYBIND11_SIMPLE_GIL_MANAGEMENT=False PYBIND11_NUMPY_1_ONLY=False

Suggested changelog entry: