Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 'upstream/master' (v2.11.1, 8a099e44b) #64

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
650 commits
Select commit Hold shift + click to select a range
58802de
perf: Add object rvalue overload for accessors. Enables reference ste…
Skylion007 Jun 1, 2022
a05bc3d
error_already_set::what() is now constructed lazily (#1895)
superbobry Jun 2, 2022
42a41bf
remove useless ctor (#3989)
Skylion007 Jun 3, 2022
554c045
enable two new clang-tidy checks (#3988)
Skylion007 Jun 6, 2022
c5fa343
[pre-commit.ci] pre-commit autoupdate (#3951)
pre-commit-ci[bot] Jun 6, 2022
918892b
Make dtype::num() return type consistent with other functions (#3995)
MaartenBaert Jun 6, 2022
e2dcd95
chore: optimize dictionary access in strip_padding numpy (#3994)
Skylion007 Jun 7, 2022
0e956a2
chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0 (#3992)
dependabot[bot] Jun 8, 2022
21f0e72
[pre-commit.ci] pre-commit autoupdate (#4003)
pre-commit-ci[bot] Jun 14, 2022
0964a90
Add a missing std::move in numpy.h (#4005)
Skylion007 Jun 14, 2022
2ad974c
[pre-commit.ci] pre-commit autoupdate (#4021)
pre-commit-ci[bot] Jun 21, 2022
c3e9173
ci: use almalinux instead of centos, add 9 (#4020)
henryiii Jun 21, 2022
dd3bf7f
[pre-commit.ci] pre-commit autoupdate (#4030)
pre-commit-ci[bot] Jun 27, 2022
374a5b0
[docs] Fix "Enumerations and internal types" example (#4034)
crcrpar Jun 28, 2022
479e9a5
Fix arrays with zero-size dimensions (#4038)
mwoehlke-kitware Jun 29, 2022
5a3a1e3
chore: simpler dependabot (#4035)
henryiii Jul 4, 2022
bc1f9f9
chore(deps): bump actions/setup-python from 3 to 4 (#3999)
dependabot[bot] Jul 4, 2022
c42e3ab
[pre-commit.ci] pre-commit autoupdate (#4041)
pre-commit-ci[bot] Jul 5, 2022
2af163d
Fix: 3.11 beta support (#3923)
Skylion007 Jul 6, 2022
0ab1fcf
docs: update changelog (#4042)
henryiii Jul 6, 2022
cd08869
PYBIND11_NAMESPACE consistency fixes. (#4043)
Jul 6, 2022
85bc088
Report `C++ Info:` via `pytest_report_header()` (#4046)
Jul 8, 2022
432bc5c
Add `std::string clean_type_id(const char *typeid_name)` overload (in…
Jul 8, 2022
f9f0049
Properly visit self in >=3.9 traverse (#4051)
Skylion007 Jul 10, 2022
790241b
[pre-commit.ci] pre-commit autoupdate (#4058)
pre-commit-ci[bot] Jul 12, 2022
023b3f3
Undo accidental one-line change under PR #3913 (#4060)
Jul 12, 2022
7c3a031
chore: bump clang-tidy to 13 (#3997)
henryiii Jul 13, 2022
6b60d97
docs: use Furo (#3109)
henryiii Jul 13, 2022
bc9315f
chore: optimize sparse matrix casting with python tuple (#4064)
Skylion007 Jul 13, 2022
1d81191
Disable implicit conversion of `0` to `pybind11::handle`. (#4008)
Jul 14, 2022
87f64c4
docs: update changelog for 2.10.0 (#4066)
henryiii Jul 15, 2022
aa304c9
chore: preapre for 2.10.0 release (#4068)
henryiii Jul 15, 2022
8d82f29
chore: back to work
henryiii Jul 16, 2022
5116a62
fix(spelling): PYTHON_VERSIONS
henryiii Jul 16, 2022
59f03ee
tests: include pypy3.9 in nox if present
henryiii Jul 16, 2022
ef7d971
[pre-commit.ci] pre-commit autoupdate (#4082)
pre-commit-ci[bot] Jul 19, 2022
f47f1ed
Fix #3812 and fix const of inplace assignments (#4065)
Skylion007 Jul 20, 2022
42b5450
chore: use explicit defaulting in pyobject macros (#4017)
Skylion007 Jul 20, 2022
cb35a3c
For PyPy only, re-enable old behavior (runs the risk of masking bugs)…
Jul 21, 2022
9a29637
More systematic gcc & clang coverage (#4083)
Jul 21, 2022
b07975f
Fix missing undef in pytypes (#4087)
Skylion007 Jul 22, 2022
d70f54b
docs: Missing semicolons (#4094)
wookookie Jul 27, 2022
1e3400b
chore(deps): bump pypa/gh-action-pypi-publish from 1.5.0 to 1.5.1 (#4…
dependabot[bot] Jul 29, 2022
3665530
Add `-DPYBIND11_WERROR=ON` to mingw cmake commands (#4073)
Aug 1, 2022
aa95371
[pre-commit.ci] pre-commit autoupdate (#4090)
pre-commit-ci[bot] Aug 1, 2022
f8e8403
Open pybind11 namespace with consistent visility. (#4098)
thomaseding Aug 1, 2022
88a1bb9
chore: remove unnecessary temporary std::pair (#4103)
Skylion007 Aug 1, 2022
ba5ccd8
[pre-commit.ci] pre-commit autoupdate (#4104)
pre-commit-ci[bot] Aug 3, 2022
29f4940
Fix copy-paste oversight (#4118)
Aug 5, 2022
8a4bca8
fix(cmake): use case-insensitive CMAKE_BUILD_TYPE comparisons (#4078)
ddinu Aug 8, 2022
6abb7de
chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functi…
Skylion007 Aug 8, 2022
14c8465
[pre-commit.ci] pre-commit autoupdate (#4126)
pre-commit-ci[bot] Aug 9, 2022
5bdd3d5
feat(cmake): add installation support for pkg-config dependency detec…
eli-schwartz Aug 9, 2022
bbb89da
fix(cmake): support vcpkg, try 2 (#4123)
henryiii Aug 9, 2022
b884b9d
chore: Add pytests for constructing pytypes from iterable (#4138)
Skylion007 Aug 11, 2022
2d59b43
Qualify detail::forward_like to avoid conflict. (#4136)
StephanTLavavej Aug 12, 2022
81f35d2
chore: Mark detail:forward_like as constexpr (#4147)
Skylion007 Aug 20, 2022
68e6fda
embed.h Python 3.11 `config.use_environment=1` + `PYTHONPATH` test (#…
rwgk Aug 21, 2022
a48ec3e
Words matter updates (#4155)
messerb5467 Aug 24, 2022
fac23b6
`error_fetch_and_normalize`: PyPy 7.3.10+ does not need the PR #4079 …
Aug 24, 2022
0b4c1bc
test: ConstructorStats newline (PyPy) (#4167)
ax3l Aug 30, 2022
283f10d
chore(deps): bump ilammy/msvc-dev-cmd from 1.10.0 to 1.11.0 (#4161)
dependabot[bot] Aug 30, 2022
8756f16
[pre-commit.ci] pre-commit autoupdate (#4151)
pre-commit-ci[bot] Aug 30, 2022
aa8f8ba
[pre-commit.ci] pre-commit autoupdate (#4171)
pre-commit-ci[bot] Sep 7, 2022
64f7281
[pre-commit.ci] pre-commit autoupdate (#4178)
pre-commit-ci[bot] Sep 13, 2022
8524b20
fix: Python-3.12 compatibility (#4168)
sizmailov Sep 14, 2022
1874f8f
Clarify GIL documentation (#4057)
virtuald Sep 14, 2022
9c04c7b
chore: Delete copy ctor/assign for GIL RAIIs (#4183)
Skylion007 Sep 19, 2022
d02f219
[pre-commit.ci] pre-commit autoupdate (#4189)
pre-commit-ci[bot] Sep 20, 2022
424ac4f
fix: Windows compiler, missing object initializer (#4188)
jiwaszki Sep 20, 2022
95d0e71
test C++14 on MSVC (#4191)
Skylion007 Sep 21, 2022
f743bdf
Avoid local_internals destruction (#4192)
bogdan-lab Sep 21, 2022
5aa0fad
perf: call reserve method in set and map casters (#4194)
Skylion007 Sep 25, 2022
da8c730
[pre-commit.ci] pre-commit autoupdate (#4197)
pre-commit-ci[bot] Sep 27, 2022
c78dfe6
bugfix: Add error checking to list append and insert (#4208)
Skylion007 Oct 3, 2022
600d697
[pre-commit.ci] pre-commit autoupdate (#4210)
pre-commit-ci[bot] Oct 4, 2022
8275b76
ci: update pre-commit schedule (#4212)
henryiii Oct 4, 2022
864ed11
chore: steal arg_v.value from copied arg in unpacking_collector (#4219)
Skylion007 Oct 6, 2022
6cb2147
fix: NVCC 11.4.0 - 11.8.0 host bug workaround (#4220)
ax3l Oct 7, 2022
4a42156
test_eigen.py test_nonunit_stride_to_python bug fix (ASAN failure) (#…
Oct 7, 2022
7c6f2f8
fix: PyCapsule_GetDestructor is allowed to return a nullptr destructo…
galv Oct 7, 2022
da104a9
Reproducer and fix for issue encountered in smart_holder update. (#4228)
Oct 10, 2022
ff7b697
chore(deps): bump jwlawson/actions-setup-cmake from 1.12 to 1.13 (#4233)
dependabot[bot] Oct 11, 2022
0927c4d
chore: Improve PyCapsule exception handling (#4232)
Skylion007 Oct 11, 2022
8781daf
chore: Optimize iterator advance() call (#4237)
Skylion007 Oct 12, 2022
964c499
Minor `py::capsule` cleanup. No functional change. (#4238)
Oct 12, 2022
5b5547b
chore(deps): bump ilammy/msvc-dev-cmd from 1.11.0 to 1.12.0 (#4242)
dependabot[bot] Oct 17, 2022
b926396
bugfix: py contains raises errors when appropiate (#4209)
Skylion007 Oct 17, 2022
fab1eeb
First draft of Eigen::Tensor support (#4201)
EthanSteinberg Oct 18, 2022
17c6809
ci: update PGI build (old one no longer signed) (#4260)
Oct 20, 2022
c385468
ci(fix): don't label weekly dep updates & ci fixes (#4264)
henryiii Oct 20, 2022
1d4a65e
feat: add entrypoint for cmake modules dir (#4258)
henryiii Oct 20, 2022
128d988
ci: fix labeler
henryiii Oct 20, 2022
36ccb08
docs: update changelog (#4265)
henryiii Oct 20, 2022
2ce76f7
Cleanup casters to release none() to avoid ref counting (#4269)
Skylion007 Oct 21, 2022
91cfb77
Revert "feat: add entrypoint for cmake modules dir" (#4270)
henryiii Oct 21, 2022
17c1e27
fix: Revert pfect args make iterator (#4234)
Skylion007 Oct 21, 2022
8ea75ab
Fix casts to void* (#4275)
EthanSteinberg Oct 22, 2022
4fe905d
fix: add flag for overriding classic Python search values (#4195)
henryiii Oct 23, 2022
d1c31e9
chore: improve issue template (#4276)
henryiii Oct 23, 2022
07a61aa
Fix char8_t support (#4278)
VemundH Oct 23, 2022
fcb5554
ci: move to final release of 3.11 (#4286)
henryiii Oct 26, 2022
b07223f
fix: improve bytes to str decoding error handling (#4294)
Skylion007 Oct 29, 2022
b07d08f
Add `PYBIND11_SIMPLE_GIL_MANAGEMENT` option (cmake, C++ define) (#4216)
Chekov2k Oct 30, 2022
5bc0943
Ensure config, build, toolchain, spelling, etc. issues are not masked…
Oct 30, 2022
3a2c96b
fix: unicode surrogate character in Python exception message. (#4297)
Oct 31, 2022
b1bd7f2
fix: define (non-empty) `PYBIND11_EXPORT_EXCEPTION` only under macOS.…
Oct 31, 2022
252ed8f
docs: prepare for 2.10.1 release (#4279)
henryiii Oct 31, 2022
2441d25
chore(deps): update pre-commit hooks (#4302)
pre-commit-ci[bot] Nov 1, 2022
0176632
chore: sync blacken-docs hook with black (#4304)
Skylion007 Nov 1, 2022
ee2b522
Fix functional.h bug + introduce test to verify that it is fixed (#4254)
EthanSteinberg Nov 2, 2022
1f04cc7
Add windows_clang to ci.yml (#4323)
Nov 10, 2022
88b019a
fix pybind11Tools.cmake typo causing Unknown arguments (#4327)
gitartpiano Nov 12, 2022
296615a
Add macos_brew_install_llvm to ci.yml (#4326)
Nov 12, 2022
4894922
Use `PyEval_InitThreads()` as intended (#4350)
Nov 22, 2022
9c18a74
Use `multiprocessing` `start_method` `"forkserver"` (#4306)
Nov 23, 2022
9907bed
fix(.github): fix bug-report issue template (#4363)
XuehaiPan Nov 25, 2022
06003e8
Introduce a new style of warning suppression based on push/pop (#4285)
EthanSteinberg Nov 28, 2022
8869984
scoped_interpreter. overloaded constructor: PyConfig param (#4330)
arman-novikov Dec 1, 2022
b14d58b
chore(deps): bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#4…
dependabot[bot] Dec 1, 2022
358ba45
Fix test added with PR #4330 (#4372)
Dec 1, 2022
e133c33
chore: Convert direct multiprocessing.set_start_method("forkserver") …
Skylion007 Dec 1, 2022
5b55f8f
Replace `ubuntu-latest` with `ubuntu-22.04` (#4382)
Dec 5, 2022
6a1023e
chore(deps): bump deadsnakes/action from 2.1.1 to 3.0.0 (#4383)
dependabot[bot] Dec 5, 2022
a6e75e4
chore(deps): bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.1 (#4…
dependabot[bot] Dec 5, 2022
a672de7
Fix source comment typo (#4388)
luzpaz Dec 6, 2022
4768a6f
chore(deps): update pre-commit hooks (#4386)
pre-commit-ci[bot] Dec 6, 2022
65cc9d2
chore(deps): bump pypa/gh-action-pypi-publish from 1.6.1 to 1.6.4 (#4…
dependabot[bot] Dec 7, 2022
65374c8
`pybind11::handle` `inc_ref()` & `dec_ref()` `PyGILState_Check()` **e…
Dec 9, 2022
0012685
Add option for enable/disable enum members in docstring. (#2768)
knarfS Dec 9, 2022
9db9880
Correct class names for KeysView, ValuesView and ItemsView in bind_ma…
aimir Dec 9, 2022
663b86c
Add flake8 `B905` to `extend-ignore` in setup.cfg (#4391)
Dec 9, 2022
9727dcd
chore: future safe bugbear opinionated warnings (#4393)
henryiii Dec 10, 2022
ff42f52
Systematically add `-DCMAKE_VERBOSE_MAKEFILE=ON` to obtain full comma…
Dec 13, 2022
89c3561
Fix multi-context new Python linking mode (#4401)
mablanchard Dec 14, 2022
ece1206
ci: set `env: VERBOSE: 1` (#4405)
Dec 15, 2022
09db644
IPO/LTO support for ICX (IntelLLVM) compiler (#4402)
mablanchard Dec 16, 2022
a97c4d2
fix(cmake): support Windows ARM cross-compilation (#4406)
henryiii Dec 19, 2022
ee4b9f5
Fix ODR violations in our Eigen Tensor tests (#4412)
EthanSteinberg Dec 20, 2022
3fd1520
docs: changelog for next version (#4413)
henryiii Dec 20, 2022
0694ec6
chore: preapre for 2.10.2 release (#4414)
henryiii Dec 20, 2022
7f23e9f
chore: update clang-tidy to 15 (#4387)
Skylion007 Dec 27, 2022
70af987
docs: fixed typo in spelling of first (#4428)
kajananchinniah Dec 28, 2022
60f02f5
fix: improve the error reporting for inc_ref GIL failures (#4427)
EthanSteinberg Dec 30, 2022
f12e098
Fix `detail::obj_class_name()` to work correctly for meta classes. (#…
Jan 2, 2023
6da268a
ci: remove clang 10 C++20 (it broke recently) (#4438)
Jan 3, 2023
e3e24f3
fix: issuses detected by static analyzer (#4440)
cyyever Jan 3, 2023
769fd3b
chore(deps): update pre-commit hooks (#4439)
pre-commit-ci[bot] Jan 3, 2023
b2d7ad7
chore: prepare for 2.10.3 (#4437)
henryiii Jan 3, 2023
a34596b
chore: back to work
henryiii Jan 3, 2023
d821788
Add clang15 C++20 job (#4443)
Jan 13, 2023
e53d58a
Ensure `import pybind11_tests` traceback is shown. (#4455)
Jan 14, 2023
c709d2a
Make sure to properly untrack gc objects before freeing them (#4461)
albanD Jan 18, 2023
a500f43
Resolve new flake8 error (#4462)
Jan 19, 2023
c71e3af
Bump isort version to 5.12.0 (#4480)
Feb 1, 2023
44e9368
Use PyConfig_InitPythonConfig instead of PyConfig_InitIsolatedConfig …
danielcjacobs Feb 1, 2023
3efe9d4
chore: update to black 23 (#4482)
henryiii Feb 1, 2023
08a89fa
bugfix: delete proper ctors in gil.h (#4490)
Skylion007 Feb 4, 2023
9ef65ce
chore(deps): bump ilammy/msvc-dev-cmd from 1.12.0 to 1.12.1 (#4493)
dependabot[bot] Feb 6, 2023
b2c1978
bugfix: Keep registered types until after Py_Finalize(). Fix #4459 (#…
Skylion007 Feb 6, 2023
8a90b36
chore(deps): update pre-commit hooks (#4495)
pre-commit-ci[bot] Feb 7, 2023
f8713ec
Revert "bugfix: Keep registered types until after Py_Finalize(). Fix …
Feb 8, 2023
b8f2855
Go back to CMake 3.25.2 (#4496)
Feb 8, 2023
531144d
Replace "whitelist" with "allowlist" (#4506)
mikeessen Feb 9, 2023
8dcced2
Always display python type information in cast errors (#4463)
virtuald Feb 10, 2023
535f81a
fix: tests dir has started to show up in packaging (#4510)
henryiii Feb 16, 2023
08a4a47
Revert "Go back to CMake 3.25.2 (#4496)" (#4503)
Feb 16, 2023
d1956ea
Appease new flake8 B028 error: (#4513)
Feb 17, 2023
6a5e600
Make warning suppressions MINGW-specific again. (#4515)
Feb 17, 2023
68211d4
fix: nicer stack level for warning (#4516)
henryiii Feb 17, 2023
a19daea
Inconsistent comments between 2 templates of `unchecked()`. (#4519)
xkszltl Feb 20, 2023
438034c
chore: move to Ruff and add rules (#4483)
henryiii Feb 22, 2023
3cc7e42
add --version option to pybind11-config (#4526)
eli-schwartz Feb 23, 2023
cbb876c
chore(deps): update pre-commit hooks (#4552)
pre-commit-ci[bot] Mar 7, 2023
442261d
Remove test code that does not exercise anything in pybind11, but bre…
Mar 9, 2023
04ef4e4
chore(deps): bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.1 (#4…
dependabot[bot] Mar 16, 2023
c4c15d4
docs: changelog for 2.10.4 (#4532)
henryiii Mar 16, 2023
cf7d2e6
Change `always_forkserver_on_unix()` to `use_multiprocessing_forkserv…
Mar 16, 2023
286873e
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.1 to 1.8.3 (#4…
dependabot[bot] Mar 23, 2023
5bbcba5
use C++17 syntax to get rid of recursive template instantiations for …
k-bespalov Mar 24, 2023
66f12df
chore: make #4587 use proper cpp17 feature macro (#4592)
Skylion007 Mar 27, 2023
1e8b52a
bugfix: allow noexcept lambdas in C++17. Fix #4565 (#4593)
Skylion007 Mar 28, 2023
654fe92
Introduce `get_python_state_dict()` for Python 3.12 compatibility. (#…
Mar 28, 2023
4ce0517
ci: Python 3.12 optional test job (#4575)
henryiii Mar 30, 2023
7ab88d2
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.3 to 1.8.4 (#4…
dependabot[bot] Apr 3, 2023
ed466da
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.4 to 1.8.5 (#4…
dependabot[bot] Apr 7, 2023
071f35a
chore(deps): bump jwlawson/actions-setup-cmake from 1.13 to 1.14 (#4632)
dependabot[bot] Apr 23, 2023
07725c2
Introduce `pybind11::detail::is_move_constructible` (#4631)
Apr 24, 2023
ff7f5df
1. Fully test unstable ABI (#4635)
Apr 25, 2023
6de6191
Use `std::hash<std::type_index>`, `std::equal_to<std::type_index>` ev…
Apr 25, 2023
3f366ff
Remove stray comment. (Oversight in PR #4631. Noticed by chance.) (#4…
Apr 27, 2023
5e946c2
chore(deps): update pre-commit hooks (#4605)
pre-commit-ci[bot] Apr 28, 2023
956390a
fix(cmake): only define lto if CMAKE's IPO setting is unset (#4643)
henryiii Apr 29, 2023
da91926
fix: remove -stdlib=libc++ from setup helpers, not needed on modern P…
biergaizi May 1, 2023
dff75a6
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 (#4…
dependabot[bot] May 3, 2023
b3e88ec
chore(deps): update pre-commit hooks (#4648)
pre-commit-ci[bot] May 3, 2023
f701654
Introduce recursive_container_traits (#4623)
franzpoeschel May 5, 2023
90312a6
Add `type_caster<PyObject>` (#4601)
May 7, 2023
e9b961d
Elide to-python conversion of setter return values (#4621)
May 8, 2023
cca4c51
Update errors in string "Explicit conversions" docs (#4658)
tjstum May 9, 2023
d72ffb4
ci: set minimal permissions to github workflows (#4665)
joycebrum May 15, 2023
19816f0
chore: update changelog, with target date for v2.11.0 release (#4677)
May 22, 2023
ce9bbc0
Python 3.11+: Add `__notes__` to `error_already_set::what()` output. …
May 23, 2023
6e6bcca
Create s Security Policy (#4671)
joycebrum May 23, 2023
8e1f9d5
Add `format_descriptor<>` & `npy_format_descriptor<>` `PyObject *` sp…
May 23, 2023
d0232b1
Use annotated for array (#4679)
cielavenir May 25, 2023
29487de
Disable 🐍 3 • CentOS7 / PGI 22.9 • x64 (#4691)
Jun 7, 2023
3617f35
chore(deps): update pre-commit hooks (#4689)
pre-commit-ci[bot] Jun 7, 2023
c679a92
chore(deps): bump deadsnakes/action from 3.0.0 to 3.0.1 (#4687)
dependabot[bot] Jun 7, 2023
0e43fcc
Python 3.12b2 testing (#4695)
Jun 10, 2023
86f60a0
pre-commit markdown-it-py<3 (for Python 3.7 compatibility) (#4704)
Jun 16, 2023
8493228
Systematically add `PIP_BREAK_SYSTEM_PACKAGES` to all .yml files from…
Jun 17, 2023
bc1bcf7
chore: 3.12 + cleanup (#4713)
henryiii Jun 21, 2023
e10da79
Undo ci.yml gcc10 workaround after docker-library/gcc#95 was resolved…
Jun 24, 2023
2fb3d7c
Trivial refactoring to make the capsule API more user friendly. (#4720)
Jun 27, 2023
5ccb9e4
chore: ruff moved to astral-sh (#4726)
henryiii Jul 4, 2023
782b628
Drop PyPy 3.7 from GitHub Actions (ci.yml) (#4728)
Jul 9, 2023
d462dd9
chore(deps): bump scipy from 1.8.0 to 1.10.0 in /tests (#4731)
dependabot[bot] Jul 10, 2023
47dc0c4
chore(deps): update pre-commit hooks (#4727)
pre-commit-ci[bot] Jul 11, 2023
b2732c6
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.7 (#4…
dependabot[bot] Jul 12, 2023
6d22dba
Warning on comparing wrapper enums with is (#4732)
lucmans Jul 12, 2023
2e5f5c4
fix: support CMake 3.27, drop 3.4 (#4719)
henryiii Jul 12, 2023
b33d06f
bugfix: fixes a test suite bug in the __new__ example (#4698)
Skylion007 Jul 12, 2023
1a917f1
docs: preparation for v2.11.0 release (#4744)
Jul 14, 2023
2965fa8
Preparation for v2.11.1 patch release (#4752)
Jul 17, 2023
8a099e4
Fix version number mishap: actually update 0 to 1 (#4756)
Jul 17, 2023
f5a414c
Merge commit '70a58c5' into feature-bump-merge-3
EricCousineau-TRI Oct 12, 2023
11284cc
Remove `./tmp` shim file to restore worktree
EricCousineau-TRI Oct 12, 2023
c33d591
Merge commit '937161476' into feature-bump-merge-curated
EricCousineau-TRI Oct 12, 2023
f7fc6bf
Merge tag 'v2.9.1' into feature-bump-merge-curated
EricCousineau-TRI Oct 12, 2023
f342c36
import clang tidy setup
EricCousineau-TRI Oct 12, 2023
f15c767
Merge commit 'ec24786eab~' into feature-bump-merge-curated
EricCousineau-TRI Oct 12, 2023
7f05a75
run re-format
EricCousineau-TRI Oct 12, 2023
10043da
Merge commit 'ec24786eab' into feature-bump-merge-curated
EricCousineau-TRI Oct 12, 2023
91e209b
re-run pre-commit
EricCousineau-TRI Oct 12, 2023
6d93f7a
Merge tag 'v2.10.0' into feature-bump-merge-curated
EricCousineau-TRI Oct 12, 2023
111af7c
huh, missed carrying this one over - oops!
EricCousineau-TRI Oct 12, 2023
6b3378e
partial revert to proper form of 8adef2c
EricCousineau-TRI Oct 12, 2023
9ad3610
Restore files lost in replay
EricCousineau-TRI Oct 12, 2023
cc9fb57
configure: Disable windows and cmake 3.4 testing
EricCousineau-TRI Oct 12, 2023
e61bb56
fix ci syntax err
EricCousineau-TRI Oct 12, 2023
7d1fc18
Merge commit 'fab1eebe2c4c~' into feature-bump-merge-curated-moar
EricCousineau-TRI Oct 12, 2023
432c941
Prep fork for effective rename
EricCousineau-TRI Oct 12, 2023
098786d
Merge commit 'fab1eebe2c4c' into feature-bump-merge-curated-moar
EricCousineau-TRI Oct 12, 2023
c24c4e4
Merge tag 'v2.11.1' into feature-bump-merge-curated-moar
EricCousineau-TRI Oct 12, 2023
44b38a5
oops forgot to keep this
EricCousineau-TRI Oct 12, 2023
8edb237
fix latent err
EricCousineau-TRI Oct 12, 2023
f35d257
fix ci syntax err
EricCousineau-TRI Oct 12, 2023
22186cc
only check ref_count for temporary values
EricCousineau-TRI Oct 17, 2023
d280f26
fixup! no if constexpr please
EricCousineau-TRI Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.0.{build}
image:
- Visual Studio 2015
- Visual Studio 2017
test: off
skip_branch_with_pr: true
build:
Expand All @@ -11,11 +11,9 @@ environment:
matrix:
- PYTHON: 36
CONFIG: Debug
- PYTHON: 27
CONFIG: Debug
install:
- ps: |
$env:CMAKE_GENERATOR = "Visual Studio 14 2015"
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
python -W ignore -m pip install --upgrade pip wheel
Expand Down
19 changes: 19 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,36 @@
# clang-format --style=llvm --dump-config
BasedOnStyle: LLVM
AccessModifierOffset: -4
AllowShortLambdasOnASingleLine: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakConstructorInitializers: BeforeColon
ColumnLimit: 99
CommentPragmas: 'NOLINT:.*|^ IWYU pragma:'
IncludeBlocks: Regroup
IndentCaseLabels: true
IndentPPDirectives: AfterHash
IndentWidth: 4
Language: Cpp
SpaceAfterCStyleCast: true
Standard: Cpp11
StatementMacros: ['PyObject_HEAD']
TabWidth: 4
IncludeCategories:
- Regex: '<pybind11/.*'
Priority: -1
- Regex: 'pybind11.h"$'
Priority: 1
- Regex: '^".*/?detail/'
Priority: 1
SortPriority: 2
- Regex: '^"'
Priority: 1
SortPriority: 3
- Regex: '<[[:alnum:]._]+>'
Priority: 4
- Regex: '.*'
Priority: 5
...
118 changes: 65 additions & 53 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,65 +1,77 @@
FormatStyle: file

Checks: '
*bugprone*,
cppcoreguidelines-init-variables,
cppcoreguidelines-slicing,
clang-analyzer-optin.cplusplus.VirtualCall,
google-explicit-constructor,
llvm-namespace-comment,
misc-misplaced-const,
misc-non-copyable-objects,
misc-static-assert,
misc-throw-by-value-catch-by-reference,
misc-uniqueptr-reset-release,
misc-unused-parameters,
modernize-avoid-bind,
modernize-make-shared,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-default-member-init,
modernize-use-noexcept,
modernize-use-emplace,
modernize-use-override,
modernize-use-using,
*performance*,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-size-empty,
readability-delete-null-pointer,
readability-else-after-return,
readability-implicit-bool-conversion,
readability-make-member-function-const,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
-bugprone-exception-escape,
-bugprone-reserved-identifier,
-bugprone-unused-raii,
'
Checks: |
*bugprone*,
*performance*,
clang-analyzer-optin.cplusplus.VirtualCall,
clang-analyzer-optin.performance.Padding,
cppcoreguidelines-init-variables,
cppcoreguidelines-prefer-member-initializer,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-slicing,
google-explicit-constructor,
llvm-namespace-comment,
misc-definitions-in-headers,
misc-misplaced-const,
misc-non-copyable-objects,
misc-static-assert,
misc-throw-by-value-catch-by-reference,
misc-uniqueptr-reset-release,
misc-unused-parameters,
modernize-avoid-bind,
modernize-loop-convert,
modernize-make-shared,
modernize-redundant-void-arg,
modernize-replace-auto-ptr,
modernize-replace-disallow-copy-and-assign-macro,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-default-member-init,
modernize-use-emplace,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-noexcept,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-const-return-type,
readability-container-size-empty,
readability-delete-null-pointer,
readability-else-after-return,
readability-implicit-bool-conversion,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-qualified-auto,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-suspicious-call-argument,
readability-uniqueptr-delete-release,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-bugprone-reserved-identifier,
-bugprone-unused-raii,

CheckOptions:
- key: modernize-use-equals-default.IgnoreMacros
value: false
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: true
- key: performance-inefficient-string-concatenation.StrictMode
value: true
- key: performance-unnecessary-value-param.AllowedTypes
value: 'exception_ptr$;'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: true

HeaderFilterRegex: 'pybind11/.*h'

WarningsAsErrors: '*'
24 changes: 24 additions & 0 deletions .codespell-ignore-lines
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t>
template <typename ThisT>
auto &this_ = static_cast<ThisT &>(*this);
if (load_impl<ThisT>(temp, false)) {
ssize_t nd = 0;
auto trivial = broadcast(buffers, nd, shape);
auto ndim = (size_t) nd;
int nd;
ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; }
using op = op_impl<id, ot, Base, L_type, R_type>;
template <op_id id, op_type ot, typename L, typename R>
template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra>
class_ &def(const detail::op_<id, ot, L, R> &op, const Extra &...extra) {
class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra &...extra) {
@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"])
struct IntStruct {
explicit IntStruct(int v) : value(v){};
~IntStruct() { value = -value; }
IntStruct(const IntStruct &) = default;
IntStruct &operator=(const IntStruct &) = default;
py::class_<IntStruct>(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); }));
py::implicitly_convertible<int, IntStruct>();
m.def("test", [](int expected, const IntStruct &in) {
[](int expected, const IntStruct &in) {
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/*.svg binary
28 changes: 15 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,18 @@ cmake --build build -j4

Tips:

* You can use `virtualenv` (from PyPI) instead of `venv` (which is Python 3
only).
* You can use `virtualenv` (faster, from PyPI) instead of `venv`.
* You can select any name for your environment folder; if it contains "env" it
will be ignored by git.
* If you dont have CMake 3.14+, just add cmake to the pip install command.
* If you don't have CMake 3.14+, just add "cmake" to the pip install command.
* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+
* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`.
FindPython uses `-DPython_ROOT_DIR=/path/to` or
`-DPython_EXECUTABLE=/path/to/python`.

### Configuration options

In CMake, configuration options are given with “-D”. Options are stored in the
In CMake, configuration options are given with "-D". Options are stored in the
build directory, in the `CMakeCache.txt` file, so they are remembered for each
build directory. Two selections are special - the generator, given with `-G`,
and the compiler, which is selected based on environment variables `CXX` and
Expand All @@ -115,12 +114,12 @@ after the initial run.
The valid options are:

* `-DCMAKE_BUILD_TYPE`: Release, Debug, MinSizeRel, RelWithDebInfo
* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+s FindPython instead of the
* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+'s FindPython instead of the
classic, deprecated, custom FindPythonLibs
* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests)
* `-DBUILD_TESTING=ON`: Enable the tests
* `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests
* `-DOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests
* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests
* `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the
master project)
* `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir
Expand Down Expand Up @@ -159,8 +158,9 @@ tests with these targets:
* `test_cmake_build`: Install / subdirectory tests

If you want to build just a subset of tests, use
`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`. If this is
empty, all tests will be built.
`-DPYBIND11_TEST_OVERRIDE="test_callbacks;test_pickling"`. If this is
empty, all tests will be built. Tests are specified without an extension if they need both a .py and
.cpp file.

You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or
by using the `PYTEST_ADDOPTS` environment variable
Expand Down Expand Up @@ -235,12 +235,14 @@ directory inside your pybind11 git clone. Files will be modified in place,
so you can use git to monitor the changes.

```bash
docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:12
apt-get update && apt-get install -y python3-dev python3-pytest
cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
cmake --build build -j 2 -- --keep-going
docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:15-bullseye
apt-get update && apt-get install -y git python3-dev python3-pytest
cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
cmake --build build -j 2
```

You can add `--fix` to the options list if you want.

### Include what you use

To run include what you use, install (`brew install include-what-you-use` on
Expand All @@ -256,7 +258,7 @@ The report is sent to stderr; you can pipe it into a file if you wish.
### Build recipes

This builds with the Intel compiler (assuming it is in your path, along with a
recent CMake and Python 3):
recent CMake and Python):

```bash
python3 -m venv venv
Expand Down
22 changes: 19 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ body:
- type: markdown
attributes:
value: |
Maintainers will only make a best effort to triage PRs. Please do your best to make the issue as easy to act on as possible, and only open if clearly a problem with pybind11 (ask first if unsure).
Please do your best to make the issue as easy to act on as possible, and only submit here if there is clearly a problem with pybind11 (ask first if unsure). **Note that a reproducer in a PR is much more likely to get immediate attention.**

- type: checkboxes
id: steps
attributes:
Expand All @@ -20,6 +21,13 @@ body:
- label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new).
required: false

- type: input
id: version
attributes:
label: What version (or hash if on master) of pybind11 are you using?
validations:
required: true

- type: textarea
id: description
attributes:
Expand All @@ -40,6 +48,14 @@ body:
The code should be minimal, have no external dependencies, isolate the
function(s) that cause breakage. Submit matched and complete C++ and
Python snippets that can be easily compiled and run to diagnose the
issue. If possible, make a PR with a new, failing test to give us a
starting point to work on!
issue. — Note that a reproducer in a PR is much more likely to get
immediate attention: failing tests in the pybind11 CI are the best
starting point for working out fixes.
render: text

- type: input
id: regression
attributes:
label: Is this a regression? Put the last known working version here if it is.
description: Put the last known working version here if this is a regression.
value: Not a regression
32 changes: 32 additions & 0 deletions .github/matchers/pylint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): ([A-DF-Z]\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-warning"
},
{
"severity": "error",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (E\\d+): \\033\\[[\\d;]+m([^\\033]+).*$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
],
"owner": "pylint-error"
}
]
}
Loading
Loading