Aaron Gokaslan
0927c4d19e
chore: Improve PyCapsule exception handling ( #4232 )
...
* Improve pycapsule error handling corner cases
* Handle another corner case
* Simplify err handling code
2022-10-11 16:07:42 -04:00
dependabot[bot]
ff7b69714d
chore(deps): bump jwlawson/actions-setup-cmake from 1.12 to 1.13 ( #4233 )
...
Bumps [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake ) from 1.12 to 1.13.
- [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases )
- [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/v1.12...v1.13 )
---
updated-dependencies:
- dependency-name: jwlawson/actions-setup-cmake
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-11 00:50:40 -04:00
Ralf W. Grosse-Kunstleve
0aa8c94528
Add pytest.skip() for CUDACC
...
```
SKIPPED [1] ../../mounted_pybind11/tests/test_type_caster_odr_guard_1.py:46: type_caster_odr_violation_detected_count() == 0: 11.2.0, C++17, CUDACC = 11.7.99
```
2022-10-09 21:58:27 -07:00
Ralf W. Grosse-Kunstleve
eb65bfb80e
Remove unnamed namespace for compatibility with CUDA 11.7 (it does not make much sense anyway).
2022-10-09 21:57:51 -07:00
Ralf W. Grosse-Kunstleve
38182082f3
Tracking ci.yml changes from master.
2022-10-09 21:56:46 -07:00
Ralf W. Grosse-Kunstleve
67561bc6d2
Merge branch 'master' into smart_holder
2022-10-09 21:55:40 -07:00
Ralf W. Grosse-Kunstleve
da104a9efd
Reproducer and fix for issue encountered in smart_holder update. ( #4228 )
...
* Reproducer for issue encountered in smart_holder update.
* clang-tidy compatibility (untested).
* Add `enable_if_t` to workaround.
* Bug fix: Move `PYBIND11_USING_WORKAROUND_FOR_CUDA_11_4_THROUGH_8` determination to detail/common.h
So that it actually is defined in pybind11.h
* Try using the workaround (which is nicer than the original code) universally.
* Reduce reproducer for CUDA 11.7 issue encountered in smart_holder update.
This commit tested in isolation on top of current master + first version of reproducer (62311eb431
).
Succeeds with Debian Clang 14.0.6 C++17 (and probably all other compilers).
Fails for CUDA 11.7:
```
cd /build/tests && /usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -Dpybind11_tests_EXPORTS -I/mounted_pybind11/include -isystem=/usr/include/python3.10 -g --generate-code=arch=compute_52,code=[compute_52,sm_52] -Xcompiler=-fPIC -Xcompiler=-fvisibility=hidden -Werror all-warnings -std=c++17 -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o -MF CMakeFiles/pybind11_tests.dir/test_class.cpp.o.d -x cu -c /mounted_pybind11/tests/test_class.cpp -o CMakeFiles/pybind11_tests.dir/test_class.cpp.o
/mounted_pybind11/tests/test_class.cpp(53): error: more than one instance of overloaded function "pybind11::class_<type_, options...>::def [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]" matches the argument list:
function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const char *, Func &&, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]"
/mounted_pybind11/include/pybind11/pybind11.h(1557): here
function template "pybind11::class_<test_class::pr4220_tripped_over_this::Empty0> &pybind11::class_<type_, options...>::def(const T &, const Extra &...) [with type_=test_class::pr4220_tripped_over_this::Empty0, options=<>]"
/mounted_pybind11/include/pybind11/pybind11.h(1586): here
argument types are: (const char [8], <unknown-type>)
object type is: pybind11::class_<test_class::pr4220_tripped_over_this::Empty0>
1 error detected in the compilation of "/mounted_pybind11/tests/test_class.cpp".
```
2022-10-09 21:50:35 -07:00
Daniel Galvez
7c6f2f80a7
fix: PyCapsule_GetDestructor is allowed to return a nullptr destructor ( #4221 )
...
* fix: PyCapsule_GetDestructor is allowed to return a nullptr destructor
Previously, this code would error out if the destructor happened to be
a nullptr. This is incorrect. nullptrs are allowed for capsule
destructors.
"It is legal for a capsule to have a NULL destructor. This makes a
NULL return code somewhat ambiguous; use PyCapsule_IsValid() or
PyErr_Occurred() to disambiguate."
See:
https://docs.python.org/3/c-api/capsule.html#c.PyCapsule_GetDestructor
I noticed this while working on a type caster related to #3858 DLPack
happens to allow the destructor not to be defined on a capsule, and I
encountered such a case. See:
e2bdd3bee8/include/dlpack/dlpack.h (L219)
* Add test for the fix.
* Update tests/test_pytypes.cpp
I tried this locally and it works!
I never knew that there are cases where `reinterpret_cast` does not work but `static_cast` does. Let's see if all compilers are happy with this.
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* style: pre-commit fixes
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-07 12:27:54 -07:00
Ralf W. Grosse-Kunstleve
59ef5307ae
[smart_holder] Add gil_scoped_acquire
to shared_ptr_trampoline_self_life_support
ctor. ( #4196 )
...
* Add `gil_scoped_acquire` to `shared_ptr_trampoline_self_life_support` ctor.
* Add test exercising fix & validation that the fix is needed (i.e. this is BROKEN).
test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr] PASSED [ 87%]
test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr_release_gil] FAILED [100%]
```
================================================================= FAILURES =================================================================
______________________________________ test_std_make_shared_factory[pass_through_shd_ptr_release_gil] ______________________________________
pass_through_func = <built-in method pass_through_shd_ptr_release_gil of PyCapsule object at 0x7f1b209707b0>
@pytest.mark.parametrize(
"pass_through_func", [m.pass_through_shd_ptr, m.pass_through_shd_ptr_release_gil]
)
def test_std_make_shared_factory(pass_through_func):
class PyChild(m.SpBase):
def __init__(self):
super().__init__(0)
obj = PyChild()
while True:
> assert pass_through_func(obj) is obj
E RuntimeError: NEEDED HERE: gil_scoped_acquire gil;
```
* Put back fix.
2022-10-07 12:24:49 -07:00
Ralf W. Grosse-Kunstleve
4a42156209
test_eigen.py test_nonunit_stride_to_python bug fix (ASAN failure) ( #4217 )
...
* Disable test triggering ASAN failure (to pin-point where the problem is).
* Fix unsafe "block" implementation in test_eigen.cpp
* Undo changes (i.e. revert back to master).
* Detect "type_caster for Eigen::Ref made a copy."
This is achieved without
* reaching into internals,
* making test_eigen.cpp depend on pybind11/numpy.h.
* Add comment pointing to PR, for easy reference.
2022-10-07 09:20:38 -07:00
Axel Huebl
6cb214748d
fix: NVCC 11.4.0 - 11.8.0 host bug workaround ( #4220 )
...
* Work-Around: NVCC 11.4.0 - 11.8.0
Adds a targeted NVCC work around for limited number of CUDA
releases. Fixed in NVCC development.
* style: pre-commit fixes
* CI: Bump CTK Version 11.2 -> 11.7
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-07 00:02:57 -04:00
Aaron Gokaslan
864ed1120c
chore: steal arg_v.value from copied arg in unpacking_collector ( #4219 )
2022-10-06 16:11:34 -04:00
Henry Schreiner
8275b76912
ci: update pre-commit schedule ( #4212 )
2022-10-04 14:01:26 -04:00
pre-commit-ci[bot]
600d697648
[pre-commit.ci] pre-commit autoupdate ( #4210 )
...
updates:
- [github.com/pre-commit/mirrors-mypy: v0.971 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v0.981 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-03 21:25:46 -04:00
Aaron Gokaslan
c78dfe6964
bugfix: Add error checking to list append and insert ( #4208 )
2022-10-03 13:44:09 -04:00
pre-commit-ci[bot]
da8c730a62
[pre-commit.ci] pre-commit autoupdate ( #4197 )
...
updates:
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-26 20:44:19 -04:00
Aaron Gokaslan
5aa0fad5de
perf: call reserve method in set and map casters ( #4194 )
...
* Call reserve method in set and map casters too
* Refactor template logic into has_reserve_method
* Adjust comment for reviews
* Rearrange reserve_maybe to not be underneath macro
2022-09-25 16:10:57 -04:00
bogdan-lab
f743bdf8e6
Avoid local_internals destruction ( #4192 )
...
* Avoid local_internals destruction
It allows to avoid possible static deinitialization fiasco.
* Add link to relevant google style guide discussion
2022-09-21 11:50:31 -07:00
Aaron Gokaslan
95d0e71a65
test C++14 on MSVC ( #4191 )
2022-09-21 11:20:07 -04:00
Jan Iwaszkiewicz
424ac4fe1b
fix: Windows compiler, missing object initializer ( #4188 )
...
* Fix for windows compiler, missing object initializer
* Removal of if-else macro for MSVC
2022-09-20 13:03:57 -04:00
pre-commit-ci[bot]
d02f219fb9
[pre-commit.ci] pre-commit autoupdate ( #4189 )
...
updates:
- [github.com/asottile/pyupgrade: v2.37.3 → v2.38.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v2.38.0 )
- [github.com/PyCQA/pylint: v2.15.2 → v2.15.3](https://github.com/PyCQA/pylint/compare/v2.15.2...v2.15.3 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-19 21:11:57 -04:00
Aaron Gokaslan
9c04c7b0f1
chore: Delete copy ctor/assign for GIL RAIIs ( #4183 )
...
* chore: Delete copy ctor/assign for GIL RAIIs
* Fix typo
* Delete copy ops for local gil scoped acquire
2022-09-19 12:56:31 -04:00
Ralf W. Grosse-Kunstleve
4e1e2fe62a
Tracking ci.yml changes from master.
2022-09-15 05:37:03 -07:00
Ralf W. Grosse-Kunstleve
e5a5a83c61
Merge branch 'master' into sh_merge_master
2022-09-15 05:35:19 -07:00
Dustin Spicuzza
1874f8fa87
Clarify GIL documentation ( #4057 )
2022-09-14 14:00:27 -07:00
Sergei Izmailov
8524b20c3c
fix: Python-3.12 compatibility ( #4168 )
...
* fix: Python-3.12 compatibility
Enable dynamic attributes for `pybind11_static_property`
* Add future-notice comment
2022-09-14 13:56:40 -07:00
pre-commit-ci[bot]
64f7281874
[pre-commit.ci] pre-commit autoupdate ( #4178 )
...
updates:
- [github.com/PyCQA/pylint: v2.15.0 → v2.15.2](https://github.com/PyCQA/pylint/compare/v2.15.0...v2.15.2 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-12 20:04:44 -04:00
pre-commit-ci[bot]
aa8f8baa4e
[pre-commit.ci] pre-commit autoupdate ( #4171 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0 )
* Update .pre-commit-config.yaml
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2022-09-07 09:19:02 -04:00
pre-commit-ci[bot]
8756f16ed8
[pre-commit.ci] pre-commit autoupdate ( #4151 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/Lucas-C/pre-commit-hooks: v1.3.0 → v1.3.1](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.3.0...v1.3.1 )
- [github.com/sirosen/texthooks: 0.3.1 → 0.4.0](https://github.com/sirosen/texthooks/compare/0.3.1...0.4.0 )
- [github.com/PyCQA/pylint: v2.14.5 → v2.15.0](https://github.com/PyCQA/pylint/compare/v2.14.5...v2.15.0 )
- [github.com/codespell-project/codespell: v2.1.0 → v2.2.1](https://github.com/codespell-project/codespell/compare/v2.1.0...v2.2.1 )
* Introduce .codespell-ignore-lines for safer (line-based instead of word-based) suppressions.
* Fix two issues: 1. ensure sort order; 2. remove duplicates
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
2022-08-29 21:59:48 -07:00
dependabot[bot]
283f10dc55
chore(deps): bump ilammy/msvc-dev-cmd from 1.10.0 to 1.11.0 ( #4161 )
...
Bumps [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd ) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/ilammy/msvc-dev-cmd/releases )
- [Commits](https://github.com/ilammy/msvc-dev-cmd/compare/v1.10.0...v1.11.0 )
---
updated-dependencies:
- dependency-name: ilammy/msvc-dev-cmd
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-29 23:26:53 -04:00
Axel Huebl
0b4c1bc286
test: ConstructorStats newline (PyPy) ( #4167 )
...
This looks like it lacks a newline.
2022-08-29 23:25:01 -04:00
Ralf W. Grosse-Kunstleve
fac23b6f65
error_fetch_and_normalize
: PyPy 7.3.10+ does not need the PR #4079 workaround anymore. ( #4154 )
2022-08-24 13:08:24 -07:00
Brad Messer
a48ec3e882
Words matter updates ( #4155 )
...
* Remove sanity check from code base.
* Use main over master.
* Better alternative that doesn't collide with language keywords/frequent usage words.
2022-08-24 07:34:31 -07:00
Ralf W. Grosse-Kunstleve
6df86934c2
Merge branch 'master' into sh_merge_master
2022-08-21 19:32:35 -07:00
Ralf W. Grosse-Kunstleve
68e6fdaa90
embed.h Python 3.11 config.use_environment=1
+ PYTHONPATH
test ( #4119 )
...
* Add debug fprintf to test_interpreter.cpp
* Update `sys.path` from `PYTHONPATH` in Python >= 3.11 branch of `initialize_interpreter()`
* Use `config.isolated = 0; config.use_environment = 1;`
As suggsted by @vstinner here: https://github.com/pybind/pybind11/pull/4119#issuecomment-1219442853
* Add `TEST_CASE("PYTHONPATH is used to update sys.path")`
* Fix clang-tidy error.
* Use `_putenv_s()` under Windows.
* Fix clang-tidy error: argument name ... in comment does not match parameter name
* Remove slash from PYTHONPATH addition, to work around Windows slash-vs-backslash issue.
* Use `py::str(...)` instead of `.attr("__str__")` as suggested by @skylion007
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
2022-08-21 09:44:01 -07:00
Aaron Gokaslan
81f35d29c6
chore: Mark detail:forward_like as constexpr ( #4147 )
2022-08-20 17:05:07 -04:00
Stephan T. Lavavej
2d59b43cbf
Qualify detail::forward_like to avoid conflict. ( #4136 )
...
C++23 feature: P2445R1 forward_like()
2022-08-11 21:19:39 -07:00
Aaron Gokaslan
b884b9dc6b
chore: Add pytests for constructing pytypes from iterable ( #4138 )
...
* Add some additional pytests
* Reorder tests
* Further reorder tests
* remove stray lines
* remove unused fixtures
2022-08-11 16:14:17 -04:00
Henry Schreiner
bbb89da152
fix(cmake): support vcpkg, try 2 ( #4123 )
...
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-08-09 00:03:36 -04:00
Eli Schwartz
5bdd3d59be
feat(cmake): add installation support for pkg-config dependency detection ( #4077 )
...
* add installation support for pkg-config dependency detection
pkg-config is a buildsystem-agnostic alternative to
`pybind11Config.cmake` that can be used from build systems other than
cmake.
Fixes #230
* tests: add test for pkg config
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-08-09 00:02:45 -04:00
pre-commit-ci[bot]
14c84654f8
[pre-commit.ci] pre-commit autoupdate ( #4126 )
...
updates:
- [github.com/asottile/yesqa: v1.3.0 → v1.4.0](https://github.com/asottile/yesqa/compare/v1.3.0...v1.4.0 )
- [github.com/PyCQA/flake8: 5.0.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/5.0.2...5.0.4 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-08 21:15:43 -04:00
Aaron Gokaslan
6abb7de6cd
chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions ( #4106 )
...
* Try to update getset_dict APIs for 3.11
* Update API for all Python versions
* Test ifdef for forward explicit forward compat
* Fix ifdef
2022-08-08 14:28:33 -04:00
Daniel Dinu
8a4bca8216
fix(cmake): use case-insensitive CMAKE_BUILD_TYPE comparisons ( #4078 )
2022-08-08 10:01:39 -04:00
Ralf W. Grosse-Kunstleve
e654460418
Disable mingw warning.
...
```
cd /d D:\a\pybind11\pybind11\build3\tests && D:\a\_temp\msys64\mingw64\bin\c++.exe -DPYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS @CMakeFiles/pybind11_tests.dir/includes_CXX.rsp -Os -DNDEBUG -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -Werror -std=c++17 -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_stl.cpp.obj -MF CMakeFiles\pybind11_tests.dir\test_stl.cpp.obj.d -o CMakeFiles\pybind11_tests.dir\test_stl.cpp.obj -c D:\a\pybind11\pybind11\tests\test_stl.cpp
In file included from D:/a/pybind11/pybind11/include/pybind11/stl.h:32,
from D:\a\pybind11\pybind11\tests\test_stl.cpp:10:
In member function 'std::enable_if_t<((__exactly_once<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<_Types>&> std::variant<_Types>::operator=(_Tp&&) [with _Tp = std::nullptr_t; _Types = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]',
inlined from 'std::enable_if_t<((__exactly_once<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<_Types>&> std::variant<_Types>::operator=(_Tp&&) [with _Tp = std::nullptr_t; _Types = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]' at D:/a/_temp/msys64/mingw64/include/c++/12.1.0/variant:1469:2,
inlined from 'bool pybind11::detail::variant_caster<V<Ts ...> >::load_alternative(pybind11::handle, bool, pybind11::detail::type_list<U, Us ...>) [with U = std::nullptr_t; Us = {}; V = std::variant; Ts = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]' at D:/a/pybind11/pybind11/include/pybind11/stl.h:375:19,
inlined from 'bool pybind11::detail::variant_caster<V<Ts ...> >::load_alternative(pybind11::handle, bool, pybind11::detail::type_list<U, Us ...>) [with U = double; Us = {std::nullptr_t}; V = std::variant; Ts = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]' at D:/a/pybind11/pybind11/include/pybind11/stl.h:378:32,
inlined from 'bool pybind11::detail::variant_caster<V<Ts ...> >::load_alternative(pybind11::handle, bool, pybind11::detail::type_list<U, Us ...>) [with U = std::__cxx11::basic_string<char>; Us = {double, std::nullptr_t}; V = std::variant; Ts = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]' at D:/a/pybind11/pybind11/include/pybind11/stl.h:378:32,
inlined from 'bool pybind11::detail::variant_caster<V<Ts ...> >::load_alternative(pybind11::handle, bool, pybind11::detail::type_list<U, Us ...>) [with U = int; Us = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}; V = std::variant; Ts = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]' at D:/a/pybind11/pybind11/include/pybind11/stl.h:378:32:
D:/a/_temp/msys64/mingw64/include/c++/12.1.0/variant:1475:38: error: 'caster.pybind11::detail::type_caster_odr_guard<std::nullptr_t, pybind11::detail::type_caster<std::nullptr_t, void> >::<unnamed>.pybind11::detail::type_caster<std::nullptr_t, void>::<unnamed>.pybind11::detail::void_caster<std::nullptr_t>::value' may be used uninitialized [-Werror=maybe-uninitialized]
1475 | std::get<__index>(*this) = std::forward<_Tp>(__rhs);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/pybind11/pybind11/include/pybind11/stl.h: In function 'bool pybind11::detail::variant_caster<V<Ts ...> >::load_alternative(pybind11::handle, bool, pybind11::detail::type_list<U, Us ...>) [with U = int; Us = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}; V = std::variant; Ts = {int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double, std::nullptr_t}]':
D:/a/pybind11/pybind11/include/pybind11/stl.h:373:14: note: 'caster.pybind11::detail::type_caster_odr_guard<std::nullptr_t, pybind11::detail::type_caster<std::nullptr_t, void> >::<unnamed>.pybind11::detail::type_caster<std::nullptr_t, void>::<unnamed>.pybind11::detail::void_caster<std::nullptr_t>::value' was declared here
373 | auto caster = make_caster<U>();
| ^~~~~~
cc1plus.exe: all warnings being treated as errors
```
2022-08-07 21:49:37 -07:00
Ralf W. Grosse-Kunstleve
1f6e9a8945
Merge branch 'master' into sh_merge_master
2022-08-07 15:43:25 -07:00
Ralf W. Grosse-Kunstleve
29f4940cd4
Fix copy-paste oversight ( #4118 )
2022-08-05 08:05:40 -07:00
pre-commit-ci[bot]
ba5ccd845a
[pre-commit.ci] pre-commit autoupdate ( #4104 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](https://github.com/asottile/pyupgrade/compare/v2.37.2...v2.37.3 )
- [github.com/hadialqattan/pycln: v2.0.4 → v2.1.1](https://github.com/hadialqattan/pycln/compare/v2.0.4...v2.1.1 )
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.2](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.2 )
* fix: minor touchups for flake8
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-08-03 11:38:07 -04:00
Aaron Gokaslan
88a1bb9260
chore: remove unnecessary temporary std::pair ( #4103 )
2022-08-01 15:48:44 -04:00
Thomas Eding
f8e8403b85
Open pybind11 namespace with consistent visility. ( #4098 )
2022-08-01 11:31:31 -07:00
pre-commit-ci[bot]
aa953710c1
[pre-commit.ci] pre-commit autoupdate ( #4090 )
...
updates:
- [github.com/asottile/pyupgrade: v2.37.1 → v2.37.2](https://github.com/asottile/pyupgrade/compare/v2.37.1...v2.37.2 )
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.971](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.971 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-01 12:18:42 -04:00