Support for Union, Optional, type[T], typing.TypeGuard, typing.TypeIs, typing.Never, typing.NoReturn and typing.Literal was added to pybind11/typing.h. #5166#5165#5194#5193#5192
In CMake, if PYBIND11_USE_CROSSCOMPILING is enabled, then CMAKE_CROSSCOMPILING will be respected and will keep pybind11 from accessing the interpreter during configuration. Several CMake variables will be required in this case, but can be deduced from the environment variable SETUPTOOLS_EXT_SUFFIX. The default (currently OFF) may be changed in the future. #5083
Bug fixes:
A refcount bug (leading to heap-use-after-free) involving trampoline functions with PyObject * return type was fixed. #5156
Return py::ssize_t from .ref_count() instead of int. #5139
A subtle bug involving C++ types with unusual operator& overrides was fixed. #5189
Support Python 3.13 with minor fix, add to CI. #5127
Fix mistake affecting old cmake and old boost. #5149
Documentation:
Build docs updated to feature scikit-build-core and meson-python, and updated setuptools instructions. #5168
Add support for Typing.Callable[..., T].
[#5202](https://github.com/pybind/pybind11/issues/5202) <https://github.com/pybind/pybind11/pull/5202>_
Bug fixes:
Avoid aligned allocation in free-threaded build in order to support macOS
versions before 10.14.
[#5200](https://github.com/pybind/pybind11/issues/5200) <https://github.com/pybind/pybind11/pull/5200>_
Version 2.13.0 (June 25, 2024)
New Features:
Support free-threaded CPython (3.13t). Add py::mod_gil_not_used() tag to
indicate if a module supports running with the GIL disabled.
[#5148](https://github.com/pybind/pybind11/issues/5148) <https://github.com/pybind/pybind11/pull/5148>_
Support for Python 3.6 was removed. (Official end-of-life: 2021-12-23).
[#5177](https://github.com/pybind/pybind11/issues/5177) <https://github.com/pybind/pybind11/pull/5177>_
py::list gained a .clear() method.
[#5153](https://github.com/pybind/pybind11/issues/5153) <https://github.com/pybind/pybind11/pull/5153>_
.. feat(types)
Support for Union, Optional, type[T], typing.TypeGuard,
typing.TypeIs, typing.Never, typing.NoReturn and
typing.Literal was added to pybind11/typing.h.
[#5166](https://github.com/pybind/pybind11/issues/5166) <https://github.com/pybind/pybind11/pull/5166>_
[#5165](https://github.com/pybind/pybind11/issues/5165) <https://github.com/pybind/pybind11/pull/5165>_
[#5194](https://github.com/pybind/pybind11/issues/5194) <https://github.com/pybind/pybind11/pull/5194>_
[#5193](https://github.com/pybind/pybind11/issues/5193) <https://github.com/pybind/pybind11/pull/5193>_
[#5192](https://github.com/pybind/pybind11/issues/5192) <https://github.com/pybind/pybind11/pull/5192>_
.. feat(cmake)
In CMake, if PYBIND11_USE_CROSSCOMPILING is enabled, then
CMAKE_CROSSCOMPILING will be respected and will keep pybind11 from
accessing the interpreter during configuration. Several CMake variables will
be required in this case, but can be deduced from the environment variable
SETUPTOOLS_EXT_SUFFIX. The default (currently OFF) may be changed in
the future.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the pip-deps group in /requirements with 1 update: pybind11[global].
Updates
pybind11[global]
from 2.12.0 to 2.13.1Release notes
Sourced from pybind11[global]'s releases.
Changelog
Sourced from pybind11[global]'s changelog.
... (truncated)
Commits
941f45b
chore: prepare for 2.13.163020d3
docs: prepare for 2.13.1 (#5203)dd0e4a0
feat(types): add support for Typing.Callable Special Case (#5202)3b47b46
fix: use manual padding of instance_map_shard (#5200)0c69e1e
chore: prepare for 2.13.0 (#5198)2be85c6
feat(types): adds support for TypeGuard and TypeIs (#5194)b5ec7c7
ci: release with trusted publisher and attestations (#5196)26281c7
feat(types): adds support for Never and NoReturn from python Typing (#5193)183059f
feat(types): add support for typing.Literal type (#5192)aebcd70
Add TypeVars / method generics typing (#5167)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show