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_thisPYBIND11_MODULEandPYBIND11_EMBEDDED_MODULEmacropy::multiple_interpreters::per_interpreter_gil(), and provide API fromsubinterpreter.hpy::native_enumis used to convert between Python enums and C++ enumspy::release_gil_before_calling_cpp_dtor,dtype::normalized_num,dtype::num_ofarray_t<handle>, andarray_t<object>py::warnings::warnandpy::warnings::new_warning_typestl.h,list|set|map_casterdo not need to explicitly transform Python iterables intotuple(),set(), ormap()array_casternow can support non-default-constructiblepybind11/conduit/pybind11_platform_abi_id.hwas factored out for usingPYBIND11_PLATFORM_ABI_IDpkgconfto find pybind11 on Pypi.—extension-suffixpybind11::detail::is_holder_constructedNew features (typing / hints)
std::functionmatch Callable typeattr_with_typefor declaring attribute types andFinal,ClassVartype annotationspy::pos_onlyto mark functions with onlyselfas positional-only; dunder methods are auto-marked likewise.numpy.object_instead of objectpy::Argsandpy::KWArgsprovide*argsand**kwargscustom type hintingcollections.abccan be used in type hints,and convertible checks of STL casters andpy::bufferRemovals
make_simple_namespacePYBIND11_NUMPY_1_ONLYBug fixes
__file__-Wmaybe-uninitializedineigen/matrix.hto turn off warningspy::argsandpy::kwargscan have subclasses__cpp_nontype_template_argsreplace__cpp_nontype_template_parameter_classdictinstead assigning new._DEBUGto 1py::slice's constructor behaves same as::in PythonBug fixes (CMake)
COMPATmode can smooth the transition--fresh--freshBug fixes (free-threading)
mutexin thetry_translate_exceptionsexception translatorInternals
PYBIND11_HAS_...macros intopybind11/detail/common.h, and splitgil_simple.hout fromgil.hTests
-Wwrite-strings,-Wunreachable-code,-Wpointer-arith, and-Wredundant-declsin some CI testsPlatforms
PYBIND11_GLOBAL_SDISTBeta Was this translation helpful? Give feedback.
All reactions