Ralf W. Grosse-Kunstleve
2e6e833929
Move type_caster_odr_guard to type_caster_odr_guard.h
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
1acc9d0555
type_caster_odr_guard_impl() cleanup
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
5d45055a58
Fix ifdef for pragma GCC diagnostic.
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
5aaf96a382
Experiment: Try any C++17 compiler.
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
590171e6aa
Add new header filename to CMakeLists.txt, test_files.py
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
3d064fcab3
Replace throw err;
to resolve clang-tidy error.
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
ed4b50bb86
IWYU cleanup of detail/type_caster_odr_guard.h
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
6a6eb6cac8
define PYBIND11_DETAIL_ODR_GUARD_IMPL_THROW_DISABLED true in test_odr_guard_1,2.cpp
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
a34771aeda
Move cpp_version_in_use() from cast.h to pybind11_tests.cpp
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
369a3905fa
Restore use of PYBIND11_WERROR
2022-06-28 00:20:52 -07:00
Ralf W. Grosse-Kunstleve
502f3cb969
Report PYBIND11_INTERNALS_ID & C++ Version from pytest_configure()
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
cfd98a7de2
Fix off-by-one in source_file_line_basename()
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
1bf2577e1f
Compatibility with old compilers.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
a8144d971d
Resolve clang-tidy error.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
15db5e5fea
Set PYBIND11_TYPE_CASTER_ODR_GUARD_ON automatically.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
e515940252
Minor cleanup.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
d390918d88
Introduce PYBIND11_TYPE_CASTER_ODR_GUARD_ON (but not set automatically).
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
47c4e7939e
Add source_file_line_basename()
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
0feb0be8c2
Show C++ version along with ODR VIOLATION DETECTED message.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
a598fe6931
Replace C++17 syntax. Compiles with Debian clang 13 C++11 mode, but fails to link. Trying GitHub Actions anyway to see if there are any platforms that support https://en.cppreference.com/w/cpp/language/tu_local before C++20. Note that Debian clang 13 C++17 works locally.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
ca5708ad96
Add new tests to CMakeLists.txt, disable PYBIND11_WERROR
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
b8876ac2af
Strip ./ from source_file_line
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
0f9bb4c892
load_type fixes & follow-on cleanup
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
24d450bf74
Add more PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL; resolves "unused" warning when compiling test_custom_type_casters.cpp
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
3a95ae1165
Replace PYBIND11_TYPE_CASTER_UNIQUE_IDENTIFIER with PYBIND11_TYPE_CASTER_SOURCE_FILE_LINE, baked into PYBIND11_TYPE_CASTER macro.
2022-06-28 00:20:51 -07:00
Ralf W. Grosse-Kunstleve
e06518da7d
Add PYBIND11_SOURCE_FILE_LINE macro.
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
1522f57d2d
WIP
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
55530437fc
Small simplification of odr_guard_impl()
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
3718516ff5
Cleanup of tests. Systematically insert if (make_caster<T>::translation_unit_local) {
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
c148a6b324
Copy from cl/454991845 snapshot Jun 14, 5:08 PM
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
9a8489031d
Restore original test_async, test_buffers from current smart_holder HEAD
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
509506955b
VERY MESSY SNAPSHOT of WIP, this was the starting point for cl/454658864, which has more changes on top.
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
d1960a18cf
Add minimal_real_caster (from PR #3862 ) to test_async, test_buffers
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
5c7e77c575
Add odr_guard_registry() used in type_caster_odr_guard() default constructor.
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
c84f3817c4
Insert type_caster_odr_guard<> (an empty struct to start with).
2022-06-28 00:20:50 -07:00
Ralf W. Grosse-Kunstleve
f158f96634
Tracking ci.yml changes from master.
2022-06-27 22:28:18 -07:00
Ralf W. Grosse-Kunstleve
cad2609381
Merge branch 'master' into smart_holder
2022-06-27 22:24:23 -07:00
Xiaofei Wang
c0cfe95b1b
Support loading unique_ptr<Derived>
as unique_ptr<Base>
. ( #4031 )
...
* Support loading unique_ptr<derived> as unique_ptr<base>.
* Fix incorrect test
* pre commit fix
* Fix clang tidy
* Resolve comments
* Resolve comments
2022-06-27 22:21:28 -07:00
pre-commit-ci[bot]
dd3bf7fd12
[pre-commit.ci] pre-commit autoupdate ( #4030 )
...
updates:
- [github.com/hadialqattan/pycln: v1.3.3 → v1.3.5](https://github.com/hadialqattan/pycln/compare/v1.3.3...v1.3.5 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-27 19:39:19 -04:00
Henry Schreiner
c3e9173f0f
ci: use almalinux instead of centos, add 9 ( #4020 )
...
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-06-21 14:55:49 -04:00
pre-commit-ci[bot]
2ad974c945
[pre-commit.ci] pre-commit autoupdate ( #4021 )
...
updates:
- [github.com/PyCQA/pylint: v2.14.1 → v2.14.3](https://github.com/PyCQA/pylint/compare/v2.14.1...v2.14.3 )
- [github.com/pre-commit/mirrors-clang-format: v14.0.4-1 → v14.0.5](https://github.com/pre-commit/mirrors-clang-format/compare/v14.0.4-1...v14.0.5 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-21 14:36:49 -04:00
Aaron Gokaslan
0964a9093a
Add a missing std::move in numpy.h ( #4005 )
2022-06-14 14:20:26 -04:00
pre-commit-ci[bot]
21f0e72b0f
[pre-commit.ci] pre-commit autoupdate ( #4003 )
2022-06-13 21:02:25 -04:00
dependabot[bot]
0e956a2e4f
chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0 ( #3992 )
...
Bumps [pre-commit/action](https://github.com/pre-commit/action ) from 2.0.3 to 3.0.0.
- [Release notes](https://github.com/pre-commit/action/releases )
- [Commits](https://github.com/pre-commit/action/compare/v2.0.3...v3.0.0 )
---
updated-dependencies:
- dependency-name: pre-commit/action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 09:22:57 -04:00
Aaron Gokaslan
e2dcd95407
chore: optimize dictionary access in strip_padding numpy ( #3994 )
...
* emplace field descriptors
* reserve sufficient capacity
* remove std::move
* properly iterate through dict
* make handle casting more explicit
* Revert to old dict api
2022-06-06 22:33:28 -04:00
Maarten Baert
918892b97e
Make dtype::num() return type consistent with other functions ( #3995 )
2022-06-06 19:41:38 -04:00
pre-commit-ci[bot]
c5fa3436c6
[pre-commit.ci] pre-commit autoupdate ( #3951 )
...
updates:
- [github.com/asottile/pyupgrade: v2.32.1 → v2.33.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.33.0 )
- [github.com/Lucas-C/pre-commit-hooks: v1.1.13 → v1.2.0](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.1.13...v1.2.0 )
- [github.com/hadialqattan/pycln: v1.3.2 → v1.3.3](https://github.com/hadialqattan/pycln/compare/v1.3.2...v1.3.3 )
- [github.com/PyCQA/pylint: v2.13.8 → v2.14.1](https://github.com/PyCQA/pylint/compare/v2.13.8...v2.14.1 )
- [github.com/pre-commit/mirrors-mypy: v0.950 → v0.960](https://github.com/pre-commit/mirrors-mypy/compare/v0.950...v0.960 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-06 17:56:18 -04:00
Aaron Gokaslan
554c045377
enable two new clang-tidy checks ( #3988 )
...
* enable two new clang-tidy checks
* Use better loop var for char
2022-06-06 12:15:45 -04:00
Aaron Gokaslan
42a41bf3e7
remove useless ctor ( #3989 )
2022-06-03 15:18:06 -04:00
Ralf W. Grosse-Kunstleve
cf2c307e7b
Merge branch 'master' into sh_merge_master
2022-06-02 16:26:40 -07:00