- Nov 19, 2022
-
-
Henry Schreiner authored
* docs: prepare for 2.10.1 release Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> * Update changelog.rst * docs: update changelog with final list of PRs Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> * Update docs/changelog.rst * chore: one more changelog bump Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Ralf W. Grosse-Kunstleve authored
Background: #2999, #4105, #4283, #4284 In a nutshell: * Only macOS actually needs `PYBIND11_EXPORT_EXCEPTION` (#4284). * Evidently (#4283), under macOS `PYBIND11_EXPORT_EXCEPTION` does not run the risk of introducing ODR violations, * but evidently (#4283) under Linux it does, in the presumably rare/unusual situation that `RTLD_GLOBAL` is used. * Windows does no have the equivalent of `RTLD_GLOBAL`, therefore `PYBIND11_EXPORT_EXCEPTION` has no practical benefit, on the contrary, noisy warning suppression pragmas are needed, therefore it is best left empty.
-
Ralf W. Grosse-Kunstleve authored
* Fix & test for issue #4288 (unicode surrogate character in Python exception message). * DRY `message_unavailable_exc` * fix: add a constexpr Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> * style: pre-commit fixes Co-authored-by:
Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> Co-authored-by:
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
Xiaofei Wang authored
-
- Oct 31, 2022
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
- Oct 30, 2022
-
-
Chekov2k authored
* Add option to force the use of the PYPY GIL scoped acquire/release logic to support nested gil access, see https://github.com/pybind/pybind11/issues/1276 and https://github.com/pytorch/pytorch/issues/83101 * Apply suggestions from code review * Update CMakeLists.txt * docs: update upgrade guide * Update docs/upgrade.rst * All bells & whistles. * Add Reminder to common.h, so that we will not forget to purge `!WITH_THREAD` branches when dropping Python 3.6 * New sentence instead of semicolon. * Temporarily pull in snapshot of PR #4246 * Add `test_release_acquire` * Add more unit tests for nested gil locking * Add test_report_builtins_internals_keys * Very minor enhancement: sort list only after filtering. * Revert change in docs/upgrade.rst * Add test_multi_acquire_release_cross_module, while also forcing unique PYBIND11_INTERNALS_VERSION for cross_module_gil_utils.cpp * Hopefully fix appar...
-
- Oct 29, 2022
-
-
Aaron Gokaslan authored
* (bugfix): Improve bytes to str decoding error handling * regroup test * Further broaden tests * Add another decode error test * Fix bug in tests * Reviewer suggestions
-
- Oct 26, 2022
-
-
Henry Schreiner authored
Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
- Oct 24, 2022
-
-
Vemund Handeland authored
Standard library macro __cpp_lib_char8_t is only available after including standard header
-
- Oct 23, 2022
-
-
Henry Schreiner authored
-
Henry Schreiner authored
* fix: PyPy needs to overrite broken FindPythonInterp values Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> * fix: add flag to opt-in to new (cross-compile) behavior Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> * Apply suggestions from code review Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Lalaland authored
* Fix casts to void* * Improve tests * style: pre-commit fixes * remove c style cast Co-authored-by:
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by:
Aaron Gokaslan <aaronGokaslan@gmail.com>
-
- Oct 22, 2022
-
-
Aaron Gokaslan authored
* Revert "chore: perfectly forward all make_iterator args (#3980)" This reverts commit 8da58da5. * Redo unrelated optimization in commit * Add tests for ambiguous overloads
-
Henry Schreiner authored
* Revert "feat: add entrypoint for cmake modules dir (#4258)" This reverts commit 1d4a65e2. * docs: revert changelog mention too
-
Aaron Gokaslan authored
-
- Oct 20, 2022
-
-
Henry Schreiner authored
Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Henry Schreiner authored
-
Henry Schreiner authored
Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Henry Schreiner authored
Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com> Signed-off-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Ralf W. Grosse-Kunstleve authored
* Simply replace "22.3" with "22.9" to see what happens. * Remove PYBIND11_TEST_FILTER to see what happens. * Revert "Remove PYBIND11_TEST_FILTER to see what happens." This reverts commit 0cba2cef0c5c5bcbf57cad219c7d5dfb0cda241c. * Remove only test_smart_ptr.cpp to see what happens. * Revert "Remove only test_smart_ptr.cpp to see what happens." This reverts commit 8e9df22c85292003abcab50260393e547567fc18. * Remove only test_virtual_functions.cpp to see what happens.
-
- Oct 19, 2022
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Lalaland authored
* First draft of Eigen::Tensor support * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix build errors * Weird allocator stuff? * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove unused + additional allocator junk * Disable warning * Use constexpr * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * clang tidy fixes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Resolve comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove auto constexpr function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Try again for older C++ * Oops forgot constexpr * Move...
-
- Oct 18, 2022
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Aaron Gokaslan authored
* bugfix: contains now throws an exception if the key is not hashable * Fix tests and improve robustness * Remove todo * Workaround PyPy corner case * PyPy xfail * Fix typo * fix xfail * Make clang-tidy happy * Remove redundant exc checking
-
dependabot[bot] authored
Bumps [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd) from 1.11.0 to 1.12.0. - [Release notes](https://github.com/ilammy/msvc-dev-cmd/releases) - [Commits](https://github.com/ilammy/msvc-dev-cmd/compare/v1.11.0...v1.12.0 ) --- updated-dependencies: - dependency-name: ilammy/msvc-dev-cmd dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com> Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Oct 13, 2022
-
-
Ralf W. Grosse-Kunstleve authored
Use `PyCapsule_Destructor` (part of the stable Python ABI) instead of spelling out the C `typedef`. The deprecation message is misleading. Replace with a message pointing to another existing ctor. Background: According to @wjakob the original motivation for deprecating the ctor (in PR #752) was to hide Python C API details, but PR #902 brought those back with a new ctor, it cannot be avoided. Having a `PyCapsule_Destructor` or a `void (*destructor)(void *)` are two separate and valid use cases.
-
Aaron Gokaslan authored
-
- Oct 12, 2022
-
-
Aaron Gokaslan authored
* Improve pycapsule error handling corner cases * Handle another corner case * Simplify err handling code
-
- Oct 11, 2022
-
-
dependabot[bot] authored
Bumps [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake) from 1.12 to 1.13. - [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases) - [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/v1.12...v1.13 ) --- updated-dependencies: - dependency-name: jwlawson/actions-setup-cmake dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com> Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Oct 10, 2022
-
-
Ralf W. Grosse-Kunstleve authored
``` SKIPPED [1] ../../mounted_pybind11/tests/test_type_caster_odr_guard_1.py:46: type_caster_odr_violation_detected_count() == 0: 11.2.0, C++17, CUDACC = 11.7.99 ```
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
* Reproducer for issue encountered in smart_holder update. * clang-tidy compatibility (untested). * Add `enable_if_t` to workaround. * Bug fix: Move `PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8` determination to detail/common.h So that it actually is defined in pybind11.h * Try using the workaround (which is nicer than the original code) universally. * Reduce reproducer for CUDA 11.7 issue encountered in smart_holder update. This commit tested in isolation on top of current master + first version of reproducer (62311eb431849d135a5db84f6c75ec390f2ede7c). Succeeds with Debian Clang 14.0.6 C++17 (and probably all other compilers). Fails for CUDA 11.7: ``` cd /build/tests && /usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -Dpybind11_tests_EXPORTS -I/mounted_pybind11/include -isystem=/usr/include/python3.10 -g --generate-code=arch=compute_52,code=[compute_52,sm_52] -Xcompiler=-fPIC -Xcompiler=-fvisibility=hidden -Werror all-warnings -std=c++17 -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o -MF CMakeFiles/pybind11_tests.dir/test_class.cpp.o.d -x cu -c /mounted_pybind11/tests/test_class.cpp -o CMakeFiles/pybind11_tests.dir/test_class.cpp.o /mounted_pybind11/tests/test_class.cpp(53): error: more than one instance of overloaded function "pybind11::class_<type_, options...>::def [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]" matches the argument list: function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const char *, Func &&, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]" /mounted_pybind11/include/pybind11/pybind11.h(1557): here function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const T &, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]" /mounted_pybind11/include/pybind11/pybind11.h(1586): here argument types are: (const char [8], <unknown-type>) object type is: pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> 1 error detected in the compilation of "/mounted_pybind11/tests/test_class.cpp". ```
-
- Oct 08, 2022
-
-
Daniel Galvez authored
* fix: PyCapsule_GetDestructor is allowed to return a nullptr destructor Previously, this code would error out if the destructor happened to be a nullptr. This is incorrect. nullptrs are allowed for capsule destructors. "It is legal for a capsule to have a NULL destructor. This makes a NULL return code somewhat ambiguous; use PyCapsule_IsValid() or PyErr_Occurred() to disambiguate." See: https://docs.python.org/3/c-api/capsule.html#c.PyCapsule_GetDestructor I noticed this while working on a type caster related to #3858 DLPack happens to allow the destructor not to be defined on a capsule, and I encountered such a case. See: https://github.com/dmlc/dlpack/blob/e2bdd3bee8cb6501558042633fa59144cc8b7f5f/include/dlpack/dlpack.h#L219 * Add test for the fix. * Update tests/test_pytypes.cpp I tried this locally and it works! I never knew that there are cases where `reinterpret_cast` does not work but `static_cast` does. Let's see if all compilers are happy with this. Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> * style: pre-commit fixes Co-authored-by:
Ralf W. Grosse-Kunstleve <rwgk@google.com> Co-authored-by:
Ralf W. Grosse-Kunstleve <rwgkio@gmail.com> Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> Co-authored-by:
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
Ralf W. Grosse-Kunstleve authored
* Add `gil_scoped_acquire` to `shared_ptr_trampoline_self_life_support` ctor. * Add test exercising fix & validation that the fix is needed (i.e. this is BROKEN). test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr] PASSED [ 87%] test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr_release_gil] FAILED [100%] ``` ================================================================= FAILURES ================================================================= ______________________________________ test_std_make_shared_factory[pass_through_shd_ptr_release_gil] ______________________________________ pass_through_func = <built-in method pass_through_shd_ptr_release_gil of PyCapsule object at 0x7f1b209707b0> @pytest.mark.parametrize( "pass_through_func", [m.pass_through_shd_ptr, m.pass_through_shd_ptr_release_gil] ) def test_std_make_shared_factory(pass_through_func): class PyChild(m.SpBase): def __init__(self): super().__init__(0) obj = PyChild() while True: > assert pass_through_func(obj) is obj E RuntimeError: NEEDED HERE: gil_scoped_acquire gil; ``` * Put back fix.
-