Version 2.8.0 #3327
henryiii
announced in
Announcements
Version 2.8.0
#3327
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
New features:
py::raise_from
to enable chaining exceptions. #3215register_local_exception_translator(ExceptionTranslator&& translator)
instead ofregister_exception_translator(ExceptionTranslator&& translator)
to keep your exception remapping code local to the module. #2650make_simple_namespace
function for instantiating PythonSimpleNamespace
objects. #2840pybind11::scoped_interpreter
andinitialize_interpreter
have new arguments to allowsys.argv
initialization. #2341view
to view arrays with a different datatype. #987reshape
on arrays. #984__new__
methods on classes by fixing bug preventing overriding methods if they have non-pybind11 siblings. #3265make_value_iterator()
, and fixmake_key_iterator()
to return references instead of copies. #3293bind_map
: #3310.items
from an iterator to a dictionary view..keys
and.values
(both dictionary views).__contains__
to take any object.pybind11::custom_type_setup
was added, for customizing thePyHeapTypeObject
corresponding to a class, which may be useful for enabling garbage collection support, among other things. #3287Changes:
__file__
constant when runningeval_file
in an embedded interpreter. #3233std::optional
now accepted inpy::slice
constructor. #1101str
,bytes
,bytearray
,tuple
,list
now consistently support passingssize_t
values for sizes and indexes. Previously, onlysize_t
was accepted in several interfaces. #3219PYBIND11_TLS_REPLACE_VALUE
arguments more than once. #3290Fixes:
__int__
returning non-int when underlying type is bool or of char type #1334py::cpp_function::initialize
was fixed. #3229pybind11::type_caster
which require lifetime extension, such as forstd::string_view
. #3237Build system improvements:
Backend and tidying up:
std::string
andstd::string_view
now avoids making an extra copy of the data on Python >= 3.3. #3257list
,set
,dict
) such as (clear()
,append()
,insert()
, etc...) and annotated them withpy-non-const
.clang-tidy-const-return
and remove useless consts. #3254 #3194google-explicit-constructor
option was enabled. #3250clang-tidy-readability
rules to make boolean casts explicit improving code readability. Also enabled other misc and readability clang-tidy checks. #3148.pop()
for list. #3116This discussion was created from the release Version 2.8.0.
Beta Was this translation helpful? Give feedback.
All reactions