mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-19 23:20:43 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
23f69dd088
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -391,7 +391,7 @@ jobs:
|
|||||||
# Testing on CentOS 7 + PGI compilers, which seems to require more workarounds
|
# Testing on CentOS 7 + PGI compilers, which seems to require more workarounds
|
||||||
centos-nvhpc7:
|
centos-nvhpc7:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: "🐍 3 • CentOS7 / PGI 22.3 • x64"
|
name: "🐍 3 • CentOS7 / PGI 22.9 • x64"
|
||||||
container: centos:7
|
container: centos:7
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -401,7 +401,7 @@ jobs:
|
|||||||
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 yum-utils
|
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 yum-utils
|
||||||
|
|
||||||
- name: Install NVidia HPC SDK
|
- name: Install NVidia HPC SDK
|
||||||
run: yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && yum -y install nvhpc-22.3
|
run: yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && yum -y install nvhpc-22.9
|
||||||
|
|
||||||
# On CentOS 7, we have to filter a few tests (compiler internal error)
|
# On CentOS 7, we have to filter a few tests (compiler internal error)
|
||||||
# and allow deeper template recursion (not needed on CentOS 8 with a newer
|
# and allow deeper template recursion (not needed on CentOS 8 with a newer
|
||||||
@ -411,12 +411,12 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
source /etc/profile.d/modules.sh
|
source /etc/profile.d/modules.sh
|
||||||
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.3
|
module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.9
|
||||||
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
|
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
|
||||||
-DCMAKE_CXX_STANDARD=11 \
|
-DCMAKE_CXX_STANDARD=11 \
|
||||||
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
|
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
|
||||||
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
|
-DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
|
||||||
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp"
|
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"
|
||||||
|
|
||||||
# Building before installing Pip should produce a warning but not an error
|
# Building before installing Pip should produce a warning but not an error
|
||||||
- name: Build
|
- name: Build
|
||||||
|
6
.github/workflows/labeler.yml
vendored
6
.github/workflows/labeler.yml
vendored
@ -10,7 +10,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/labeler@main
|
- uses: actions/labeler@main
|
||||||
if: github.event.pull_request.merged == true
|
if: >
|
||||||
|
github.event.pull_request.merged == true &&
|
||||||
|
!startsWith(github.event.pull_request.title, 'chore(deps):') &&
|
||||||
|
!startsWith(github.event.pull_request.title, 'ci(fix):') &&
|
||||||
|
!startsWith(github.event.pull_request.title, 'docs(changelog):')
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
configuration-path: .github/labeler_merged.yml
|
configuration-path: .github/labeler_merged.yml
|
||||||
|
@ -16,6 +16,107 @@ IN DEVELOPMENT
|
|||||||
|
|
||||||
Changes will be summarized here periodically.
|
Changes will be summarized here periodically.
|
||||||
|
|
||||||
|
Version 2.10.1 (Oct 2?, 2022)
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
|
||||||
|
* Allow ``pybind11::capsule`` constructor to take null destructor pointers.
|
||||||
|
`#4221 <https://github.com/pybind/pybind11/pull/4221>`_
|
||||||
|
|
||||||
|
* ``embed.h`` was changed so that ``PYTHONPATH`` is used also with Python 3.11
|
||||||
|
(established behavior).
|
||||||
|
`#4119 <https://github.com/pybind/pybind11/pull/4119>`_
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fix MSVC 2019 v.1924 & C++14 mode error for ``overload_cast``.
|
||||||
|
`#4188 <https://github.com/pybind/pybind11/pull/4188>`_
|
||||||
|
|
||||||
|
* Make augmented assignment operators non-const for the object-api. Behavior
|
||||||
|
was previously broken for augmented assignment operators.
|
||||||
|
`#4065 <https://github.com/pybind/pybind11/pull/4065>`_
|
||||||
|
|
||||||
|
* Add proper error checking to C++ bindings for Python list append and insert.
|
||||||
|
`#4208 <https://github.com/pybind/pybind11/pull/4208>`_
|
||||||
|
|
||||||
|
* Work-around for Nvidia's CUDA nvcc compiler in versions 11.4.0 - 11.8.0.
|
||||||
|
`#4220 <https://github.com/pybind/pybind11/pull/4220>`_
|
||||||
|
|
||||||
|
* A workaround for PyPy was added in the ``py::error_already_set``
|
||||||
|
implementation, related to PR `#1895 <https://github.com/pybind/pybind11/pull/1895>`_
|
||||||
|
released with v2.10.0.
|
||||||
|
`#4079 <https://github.com/pybind/pybind11/pull/4079>`_
|
||||||
|
|
||||||
|
* Fixed compiler errors when C++23 ``std::forward_like`` is available.
|
||||||
|
`#4136 <https://github.com/pybind/pybind11/pull/4136>`_
|
||||||
|
|
||||||
|
* Properly raise exceptions in contains methods (like when an object in unhashable).
|
||||||
|
`#4209 <https://github.com/pybind/pybind11/pull/4209>`_
|
||||||
|
|
||||||
|
* Further improve another error in exception handling.
|
||||||
|
`#4232 <https://github.com/pybind/pybind11/pull/4232>`_
|
||||||
|
|
||||||
|
* ``get_local_internals()`` was made compatible with
|
||||||
|
``finalize_interpreter()``, fixing potential freezes during interpreter
|
||||||
|
finalization.
|
||||||
|
`#4192 <https://github.com/pybind/pybind11/pull/4192>`_
|
||||||
|
|
||||||
|
|
||||||
|
Performance and style:
|
||||||
|
|
||||||
|
* Reserve space in set and STL map casters if possible. This will prevent
|
||||||
|
unnecessary rehashing / resizing by knowing the number of keys ahead of time
|
||||||
|
for Python to C++ casting. This improvement will greatly speed up the casting
|
||||||
|
of large unordered maps and sets.
|
||||||
|
`#4194 <https://github.com/pybind/pybind11/pull/4194>`_
|
||||||
|
|
||||||
|
* GIL RAII scopes are non-copyable to avoid potential bugs.
|
||||||
|
`#4183 <https://github.com/pybind/pybind11/pull/4183>`_
|
||||||
|
|
||||||
|
* Explicitly default all relevant ctors for pytypes in the ``PYBIND11_OBJECT``
|
||||||
|
macros and enforce the clang-tidy checks ``modernize-use-equals-default`` in
|
||||||
|
macros as well.
|
||||||
|
`#4017 <https://github.com/pybind/pybind11/pull/4017>`_
|
||||||
|
|
||||||
|
* Optimize iterator advancement in C++ bindings.
|
||||||
|
`#4237 <https://github.com/pybind/pybind11/pull/4237>`_
|
||||||
|
|
||||||
|
* Use the modern ``PyObject_GenericGetDict`` and ``PyObject_GenericSetDict``
|
||||||
|
for handling dynamic attribute dictionaries.
|
||||||
|
`#4106 <https://github.com/pybind/pybind11/pull/4106>`_
|
||||||
|
|
||||||
|
* Document that users should use ``PYBIND11_NAMESPACE`` instead of using ``pybind11`` when
|
||||||
|
opening namespaces. Using namespace declarations and namespace qualification
|
||||||
|
remain the same as ``pybind11``. This is done to ensure consistent symbol
|
||||||
|
visibility.
|
||||||
|
`#4098 <https://github.com/pybind/pybind11/pull/4098>`_
|
||||||
|
|
||||||
|
* Mark ``detail::forward_like`` as constexpr.
|
||||||
|
`#4147 <https://github.com/pybind/pybind11/pull/4147>`_
|
||||||
|
|
||||||
|
* Optimize unpacking_collector when processing ``arg_v`` arguments.
|
||||||
|
`#4219 <https://github.com/pybind/pybind11/pull/4219>`_
|
||||||
|
|
||||||
|
|
||||||
|
Build system improvements:
|
||||||
|
|
||||||
|
* Experimental support for ``cmake.modules`` entrypoint.
|
||||||
|
`#4258 <https://github.com/pybind/pybind11/pull/4258>`_
|
||||||
|
|
||||||
|
* Include a pkg-config file when installing pybind11, such as in the Python
|
||||||
|
package.
|
||||||
|
`#4077 <https://github.com/pybind/pybind11/pull/4077>`_
|
||||||
|
|
||||||
|
* Avoid stripping debug symbols when ``CMAKE_BUILD_TYPE`` is set to ``DEBUG``
|
||||||
|
instead of ``Debug``.
|
||||||
|
`#4078 <https://github.com/pybind/pybind11/pull/4078>`_
|
||||||
|
|
||||||
|
* Followup to `#3948 <https://github.com/pybind/pybind11/pull/3948>`_, fixing vcpkg again.
|
||||||
|
`#4123 <https://github.com/pybind/pybind11/pull/4123>`_
|
||||||
|
|
||||||
Version 2.10.0 (Jul 15, 2022)
|
Version 2.10.0 (Jul 15, 2022)
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -144,6 +144,8 @@ with remove_output("pybind11/include", "pybind11/share"):
|
|||||||
stdout=sys.stdout,
|
stdout=sys.stdout,
|
||||||
stderr=sys.stderr,
|
stderr=sys.stderr,
|
||||||
)
|
)
|
||||||
|
if not global_sdist:
|
||||||
|
Path("pybind11/share/cmake/pybind11/__init__.py").touch()
|
||||||
|
|
||||||
txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
|
txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
|
||||||
code = compile(txt, setup_py, "exec")
|
code = compile(txt, setup_py, "exec")
|
||||||
|
@ -166,6 +166,7 @@ def test_build_sdist(monkeypatch, tmpdir):
|
|||||||
files |= {f"pybind11{n}" for n in local_sdist_files}
|
files |= {f"pybind11{n}" for n in local_sdist_files}
|
||||||
files.add("pybind11.egg-info/entry_points.txt")
|
files.add("pybind11.egg-info/entry_points.txt")
|
||||||
files.add("pybind11.egg-info/requires.txt")
|
files.add("pybind11.egg-info/requires.txt")
|
||||||
|
files.add("pybind11/share/cmake/pybind11/__init__.py")
|
||||||
assert simpler == files
|
assert simpler == files
|
||||||
|
|
||||||
with open(os.path.join(MAIN_DIR, "tools", "setup_main.py.in"), "rb") as f:
|
with open(os.path.join(MAIN_DIR, "tools", "setup_main.py.in"), "rb") as f:
|
||||||
@ -252,6 +253,7 @@ def tests_build_wheel(monkeypatch, tmpdir):
|
|||||||
"dist-info/entry_points.txt",
|
"dist-info/entry_points.txt",
|
||||||
"dist-info/top_level.txt",
|
"dist-info/top_level.txt",
|
||||||
}
|
}
|
||||||
|
files.add("pybind11/share/cmake/pybind11/__init__.py")
|
||||||
|
|
||||||
with zipfile.ZipFile(str(wheel)) as z:
|
with zipfile.ZipFile(str(wheel)) as z:
|
||||||
names = z.namelist()
|
names = z.namelist()
|
||||||
|
@ -38,6 +38,9 @@ setup(
|
|||||||
],
|
],
|
||||||
"pipx.run": [
|
"pipx.run": [
|
||||||
"pybind11 = pybind11.__main__:main",
|
"pybind11 = pybind11.__main__:main",
|
||||||
|
],
|
||||||
|
"cmake.modules": [
|
||||||
|
"pybind11 = pybind11.share.cmake.pybind11",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
cmdclass=cmdclass
|
cmdclass=cmdclass
|
||||||
|
Loading…
Reference in New Issue
Block a user