diff options
author | adam <adam@pkgsrc.org> | 2021-08-02 20:35:42 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2021-08-02 20:35:42 +0000 |
commit | 51295c740848fb40e8eada35e69c1fb8d57c90d7 (patch) | |
tree | 314288750062f97ecb87af15a60677ac8270571f | |
parent | 68546998040300ba6aa9f34af88ae5017fbd3950 (diff) | |
download | pkgsrc-51295c740848fb40e8eada35e69c1fb8d57c90d7.tar.gz |
py-pybind11: updated to 2.7.0
Version 2.7.0
New features:
Enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types.
Allow function pointer extraction from overloaded functions.
NumPy: added .char_() to type which gives the NumPy public char result, which also distinguishes types by bit length (unlike .kind()).
Add pybind11::bytearray to manipulate bytearray similar to bytes.
pybind11/stl/filesystem.h registers a type caster that, on C++17/Python 3.6+, converts std::filesystem::path to pathlib.Path and any os.PathLike to std::filesystem::path.
A PYBIND11_VERSION_HEX define was added, similar to PY_VERSION_HEX.
Changes:
py::str changed to exclusively hold PyUnicodeObject. Previously py::str could
also hold bytes, which is probably surprising, was never documented, and can mask bugs (e.g. accidental use of py::str instead of py::bytes).
Add a safety guard to ensure that the Python GIL is held when C++ calls back into Python via object_api<>::operator() (e.g. py::function __call__). (This feature is available for Python 3.6+ only.)
Catch a missing self argument in calls to __init__().
Use std::string_view if available to avoid a copy when passing an object to a std::ostream.
An important warning about thread safety was added to the iostream.h documentation; attempts to make py::scoped_ostream_redirect thread safe have been removed, as it was only partially effective.
Fixes:
Performance: avoid unnecessary strlen calls.
Fix auto-generated documentation string when using const T in pyarray_t.
Unify error messages thrown by simple_collector/unpacking_collector.
pybind11::builtin_exception is now explicitly exported, which means the types included/defined in different modules are identical, and exceptions raised in different modules can be caught correctly. The documentation was updated to explain that custom exceptions that are used across module boundaries need to be explicitly exported as well.
Fixed exception when printing UTF-8 to a scoped_ostream_redirect.
Pickle support enhancement: setstate implementation will attempt to setattr __dict__ only if the unpickled dict object is not empty, to not force use of py::dynamic_attr() unnecessarily.
Allow negative timedelta values to roundtrip.
Fix unchecked errors could potentially swallow signals/other exceptions.
Add null pointer check with std::localtime.
Fix the weakref constructor from py::object to create a new weakref on conversion.
Avoid relying on exceptions in C++17 when getting a shared_ptr holder from a shared_from_this class.
Allow the codec's exception to be raised instead of RuntimeError when casting from py::str to std::string.
Build system improvements:
In setup_helpers.py, test for platforms that have some multiprocessing features but lack semaphores, which ParallelCompile requires.
Fix pybind11_INCLUDE_DIR in case CMAKE_INSTALL_INCLUDEDIR is absolute.
Fix bug not respecting WITH_SOABI or WITHOUT_SOABI to CMake.
Fix the default Pybind11Extension compilation flags with a Mingw64 python.
Clang on Windows: do not pass /MP (ignored flag).
pybind11.setup_helpers.intree_extensions can be used to generate Pybind11Extension instances from cpp files placed in the Python
package source tree.
Backend and tidying up:
Enable clang-tidy performance, readability, and modernization checks throughout the codebase to enforce best coding practices.,
Checks for common misspellings were added to the pre-commit hooks.
Changed Werror to stricter Werror-all for Intel compiler and fixed minor issues.
Fixed compilation with GCC < 5 when the user defines _GLIBCXX_USE_CXX11_ABI.
Added nox support for easier local testing and linting of contributions. and
Avoid RTD style issue with docutils 0.17+.
Support pipx run, such as pipx run pybind11 --include for a quick compile.
-rw-r--r-- | devel/py-pybind11/Makefile | 4 | ||||
-rw-r--r-- | devel/py-pybind11/PLIST | 5 | ||||
-rw-r--r-- | devel/py-pybind11/distinfo | 10 |
3 files changed, 11 insertions, 8 deletions
diff --git a/devel/py-pybind11/Makefile b/devel/py-pybind11/Makefile index 79fb3d9a887..4d48d5ef554 100644 --- a/devel/py-pybind11/Makefile +++ b/devel/py-pybind11/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2021/04/05 18:31:56 tnn Exp $ +# $NetBSD: Makefile,v 1.3 2021/08/02 20:35:42 adam Exp $ -DISTNAME= pybind11-2.6.2 +DISTNAME= pybind11-2.7.0 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= devel python MASTER_SITES= ${MASTER_SITE_PYPI:=p/pybind11/} diff --git a/devel/py-pybind11/PLIST b/devel/py-pybind11/PLIST index 146f7b2b237..1c547e26fd9 100644 --- a/devel/py-pybind11/PLIST +++ b/devel/py-pybind11/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.2 2021/04/05 18:31:56 tnn Exp $ +@comment $NetBSD: PLIST,v 1.3 2021/08/02 20:35:42 adam Exp $ bin/pybind11-config ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt @@ -31,11 +31,13 @@ ${PYSITELIB}/pybind11/include/pybind11/detail/common.h ${PYSITELIB}/pybind11/include/pybind11/detail/descr.h ${PYSITELIB}/pybind11/include/pybind11/detail/init.h ${PYSITELIB}/pybind11/include/pybind11/detail/internals.h +${PYSITELIB}/pybind11/include/pybind11/detail/type_caster_base.h ${PYSITELIB}/pybind11/include/pybind11/detail/typeid.h ${PYSITELIB}/pybind11/include/pybind11/eigen.h ${PYSITELIB}/pybind11/include/pybind11/embed.h ${PYSITELIB}/pybind11/include/pybind11/eval.h ${PYSITELIB}/pybind11/include/pybind11/functional.h +${PYSITELIB}/pybind11/include/pybind11/gil.h ${PYSITELIB}/pybind11/include/pybind11/iostream.h ${PYSITELIB}/pybind11/include/pybind11/numpy.h ${PYSITELIB}/pybind11/include/pybind11/operators.h @@ -43,6 +45,7 @@ ${PYSITELIB}/pybind11/include/pybind11/options.h ${PYSITELIB}/pybind11/include/pybind11/pybind11.h ${PYSITELIB}/pybind11/include/pybind11/pytypes.h ${PYSITELIB}/pybind11/include/pybind11/stl.h +${PYSITELIB}/pybind11/include/pybind11/stl/filesystem.h ${PYSITELIB}/pybind11/include/pybind11/stl_bind.h ${PYSITELIB}/pybind11/py.typed ${PYSITELIB}/pybind11/setup_helpers.py diff --git a/devel/py-pybind11/distinfo b/devel/py-pybind11/distinfo index 50e8a977b74..efcc7f0cddc 100644 --- a/devel/py-pybind11/distinfo +++ b/devel/py-pybind11/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.2 2021/04/05 18:31:56 tnn Exp $ +$NetBSD: distinfo,v 1.3 2021/08/02 20:35:42 adam Exp $ -SHA1 (pybind11-2.6.2.tar.gz) = 3782868ebaa3a156153e4ea676757d90430022ef -RMD160 (pybind11-2.6.2.tar.gz) = 1ccbbea54460edc2d9559c1277e1d719d6a9d289 -SHA512 (pybind11-2.6.2.tar.gz) = 8b76250817ced714445982f936f801b33a9184664f1f9a43ac18c81116361581a0475eda228620c3f3a3f9bd2c681aaa41e8dea0139039c6164332481937d3cb -Size (pybind11-2.6.2.tar.gz) = 174597 bytes +SHA1 (pybind11-2.7.0.tar.gz) = 72e6f26b75aad23cf769abfc04d3259ee9c1b2d3 +RMD160 (pybind11-2.7.0.tar.gz) = b0bf55851ef79d6a0520f1477924df6d95899cc4 +SHA512 (pybind11-2.7.0.tar.gz) = 6664be885581f5a7184f1cc16ea80a34feee8a7aaab0e6e4bee36ebf7692bd0067dd711e106620fd63554b5d34c992d243f07030a0b2b3fe5f4c7e76694bc2a6 +Size (pybind11-2.7.0.tar.gz) = 179214 bytes |