mirror of https://github.com/pybind/pybind11
Branch:
master
archive/smart_holder
array-sequence-fix
cpp17-aligned-new
fold-expression-caster
henryiii-patch-1
henryiii-patch-2
henryiii/revert/pycapsule
internals_ptr
issue1561_fix
master
pre-commit-ci-update-config
revert-4220-fix-nvcc-11.4-11.8
stable
undefined-macos
v1.8
v2.0
v2.1
v2.10
v2.11
v2.12
v2.13
v2.2
v2.3
v2.4
v2.5
v2.6
v2.7
v2.8
v2.9
void-caster-fix
archive/llvm_sanitizer_mods
archive/pr2198_list_caster_bytes_uint8
archive/pr2409_2020_10_18_two_defines
archive/pr2672_sideline_cast_shtc_interleaved
archive/pr2672_sideline_cast_shtc_interleaved_openspiel_pattern
archive/pr2672_test_unique_ptr_member
archive/pr2672_use_smart_holder_as_default_v1
archive/pr2687_move_holder_test_premature_delete
archive/xxx_value_ptr_xxx_holder
archive/yclass_v0
milestones_reached/pr2672_as_deployed_with_cl_358092606
v1.0
v1.1
v1.2
v1.3
v1.4
v1.5
v1.6
v1.7
v1.8
v1.8.1
v2.0.0
v2.0.0-rc1
v2.0.1
v2.1.0
v2.1.1
v2.10.0
v2.10.1
v2.10.2
v2.10.3
v2.10.4
v2.11.0
v2.11.1
v2.11.2
v2.12.0
v2.12.1
v2.13.0
v2.13.1
v2.13.2
v2.13.3
v2.13.4
v2.13.5
v2.13.6
v2.2.0
v2.2.1
v2.2.2
v2.2.3
v2.2.4
v2.3.0
v2.4.0
v2.4.1
v2.4.2
v2.4.3
v2.5.0
v2.6.0
v2.6.0b1
v2.6.0rc1
v2.6.0rc2
v2.6.0rc3
v2.6.1
v2.6.2
v2.7.0
v2.7.1
v2.8.0
v2.8.1
v2.9.0
v2.9.1
v2.9.2
v3.0.0rc1
v3.0.0rc2
v3.0.0rc3
v3.0.0rc4
${ noResults }
3 Commits (master)
Author | SHA1 | Message | Date |
---|---|---|---|
|
baa540ec34
|
fix: support free-threaded CPython with GIL disabled (#5148)
* Support free-threaded CPython (PEP 703) Some additional locking is added in the free-threaded build when `Py_GIL_DISABLED` is defined: - Most accesses to internals are protected by a single mutex - The registered_instances uses a striped lock to improve concurrency Pybind11 modules can indicate support for running with the GIL disabled by calling `set_gil_not_used()`. * refactor: use PYBIND11_MODULE (#11) Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Address code review * Suppress MSVC warning * Changes from review * style: pre-commit fixes * `py::mod_gil_not_used()` suggestion. * Update include/pybind11/pybind11.h --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com> |
1 year ago |
|
690a115d84
|
Add `py::set_error()`, use in updated `py::exception<>` documentation (#4772)
* Copy clang 17 compatibility fixes from PR #4762 to a separate PR. * static py::exception<> -> static py::handle * Add `py::set_error()` but also try the suggestion of @malfet (https://github.com/pytorch/pytorch/pull/106401#pullrequestreview-1559961407). * clang 17 compatibility fixes (#4767) * Copy clang 17 compatibility fixes from PR #4762 to a separate PR. * Add gcc:13 C++20 * Add silkeh/clang:16-bullseye C++20 * chore(deps): update pre-commit hooks (#4770) updates: - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.276 → v0.0.281](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.276...v0.0.281) - [github.com/asottile/blacken-docs: 1.14.0 → 1.15.0](https://github.com/asottile/blacken-docs/compare/1.14.0...1.15.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * docs: Remove upper bound on pybind11 in example pyproject.toml for setuptools (#4774) * docs: Remove upper bound on pybind11 in example pyproject.toml for setuptools * Update docs/compiling.rst --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> * Provide better type hints for a variety of generic types (#4259) * Provide better type hints for a variety of generic types * Makes better documentation * tuple, dict, list, set, function * Move to py::typing * style: pre-commit fixes * Update copyright line with correct year and actual author. The author information was copy-pasted from the git log output. --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Use `py::set_error()` everywhere possible (only one special case, in common.h). Overload `py::set_error(py::handle, py::handle)`. Change back to `static py::handle exc = ... .release();` Deprecate `py::exception<>::operator()` * Add `PYBIND11_WARNING_DISABLE` for INTEL and MSVC (and sort alphabetically). * `PYBIND11_WARNING_DISABLE_INTEL(10441)` does not work. For ICC only, falling back to the recommended `py::set_error()` to keep the testing simple. It is troublesome to add `--diag-disable=10441` specifically for test_exceptions.cpp, even that is non-ideal because it covers the entire file, not just the one line we need it for, and the value of exercising the trivial deprecated `operator()` on this one extra platform is practically zero. * Fix silly oversight. * NVHPC 23.5.0 generates deprecation warnings. They are currently not treated as errors, but falling back to using `py::set_error()` to not have to deal with that distraction. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Keto D. Zhang <keto.zhang@gmail.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com> |
2 years ago |
|
de4ba92c9f
|
Add `error_scope` to `detail::get_internals()` (#3981)
* Add `error_scope` to `detail::get_internals()` * Adjust test to tolerate macOS PyPy behavior. |
3 years ago |