Summary of Pybind11 Version 3.0.0 RC 1 #541
pchsu-hsupc
started this conversation in
General
Replies: 1 comment 2 replies
-
@yungyuc , please review this when you are free. Thanks. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary of Pybind11 Version 3.0.0 RC 1 ,
This is a large release, so they are issuing a release candidate that will be phased in over about a week. And also provide SPEC 4 nightly wheels. Pybind 11 3.0 includes an ABI bump on Unix. This release retains the deprecated features but will not carry them forward into upcoming 3.x release.
New features
py::class_<T, py::smart_holder>
to handle two-way conversion withstd::unique_ptr<T>
andstd::shared_ptr<T>
and disowning a Python object being passed tostd::unique_ptr<T>
, trampoline objects, andstd::enable_shared_from_this
PYBIND11_MODULE
andPYBIND11_EMBEDDED_MODULE
macropy::multiple_interpreters::per_interpreter_gil()
, and provide API fromsubinterpreter.h
py::native_enum
is used to convert between Python enums and C++ enumspy::release_gil_before_calling_cpp_dtor
,dtype::normalized_num
,dtype::num_of
array_t<handle>
, andarray_t<object>
py::warnings::warn
andpy::warnings::new_warning_type
stl.h
,list|set|map_caster
do not need to explicitly transform Python iterables intotuple()
,set()
, ormap()
array_caster
now can support non-default-constructiblepybind11/conduit/pybind11_platform_abi_id.h
was factored out for usingPYBIND11_PLATFORM_ABI_ID
pkgconf
to find pybind11 on Pypi.—extension-suffix
pybind11::detail::is_holder_constructed
New features (typing / hints)
std::function
match Callable typeattr_with_type
for declaring attribute types andFinal
,ClassVar
type annotationspy::pos_only
to mark functions with onlyself
as positional-only; dunder methods are auto-marked likewise.numpy.object_
instead of objectpy::Args
andpy::KWArgs
provide*args
and**kwargs
custom type hintingcollections.abc
can be used in type hints,and convertible checks of STL casters andpy::buffer
Removals
make_simple_namespace
PYBIND11_NUMPY_1_ONLY
Bug fixes
__file__
-Wmaybe-uninitialized
ineigen/matrix.h
to turn off warningspy::args
andpy::kwargs
can have subclasses__cpp_nontype_template_args
replace__cpp_nontype_template_parameter_class
dict
instead assigning new._DEBUG
to 1py::slice
's constructor behaves same as::
in PythonBug fixes (CMake)
COMPAT
mode can smooth the transition--fresh
--fresh
Bug fixes (free-threading)
mutex
in thetry_translate_exceptions
exception translatorInternals
PYBIND11_HAS_...
macros intopybind11/detail/common.h
, and splitgil_simple.h
out fromgil.h
Tests
-Wwrite-strings
,-Wunreachable-code
,-Wpointer-arith
, and-Wredundant-decls
in some CI testsPlatforms
PYBIND11_GLOBAL_SDIST
Beta Was this translation helpful? Give feedback.
All reactions