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
Uh oh!
There was an error while loading. Please reload this page.
-
New features:
py::raise_fromto 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_namespacefunction for instantiating PythonSimpleNamespaceobjects. #2840pybind11::scoped_interpreterandinitialize_interpreterhave new arguments to allowsys.argvinitialization. #2341viewto view arrays with a different datatype. #987reshapeon 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.itemsfrom an iterator to a dictionary view..keysand.values(both dictionary views).__contains__to take any object.pybind11::custom_type_setupwas added, for customizing thePyHeapTypeObjectcorresponding to a class, which may be useful for enabling garbage collection support, among other things. #3287Changes:
__file__constant when runningeval_filein an embedded interpreter. #3233std::optionalnow accepted inpy::sliceconstructor. #1101str,bytes,bytearray,tuple,listnow consistently support passingssize_tvalues for sizes and indexes. Previously, onlysize_twas accepted in several interfaces. #3219PYBIND11_TLS_REPLACE_VALUEarguments more than once. #3290Fixes:
__int__returning non-int when underlying type is bool or of char type #1334py::cpp_function::initializewas fixed. #3229pybind11::type_casterwhich require lifetime extension, such as forstd::string_view. #3237Build system improvements:
Backend and tidying up:
std::stringandstd::string_viewnow 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-returnand remove useless consts. #3254 #3194google-explicit-constructoroption was enabled. #3250clang-tidy-readabilityrules 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