Skip to content

Commit

Permalink
Squashed 'pybind11/' changes from 8de7772c..015a7138
Browse files Browse the repository at this point in the history
015a7138 modifications for Parselmouth v0.4
6b92b6e1 Merge branch 'v2.13' into stable
941f45bc chore: prepare for 2.13.1
63020d33 docs: prepare for 2.13.1 (#5203)
dd0e4a0b feat(types): add support for Typing.Callable Special Case (#5202)
3b47b464 fix: use manual padding of instance_map_shard (#5200)
10889fe8 Merge branch 'master' into stable
0c69e1eb chore: prepare for 2.13.0 (#5198)
2be85c60 feat(types): adds support for TypeGuard and TypeIs (#5194)
b5ec7c71 ci: release with trusted publisher and attestations (#5196)
26281c79 feat(types): adds support for Never and NoReturn from python Typing (#5193)
183059f9 feat(types): add support for typing.Literal type (#5192)
aebcd704 Add TypeVars / method generics typing (#5167)
9ec64e37 docs: prepare for 2.13.0 (#5187)
a406a62e fix: use `std::addressof` in type_caster_base.h (#5189)
f1a2e03d feat: remove Python 3.6 support (#5177)
5552cbf2 Add Python 3.10, 3.11, 3.12 to win32 job matrix. (#5179)
186df220 docs: building suggestions update (#5168)
baa540ec fix: support free-threaded CPython with GIL disabled (#5148)
1961b96a chore(deps): bump urllib3 from 2.2.1 to 2.2.2 in /docs (#5170)
fdd20d69 chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5169)
7c4ac91d Add type[T] support to typing.h (#5166)
68405a11 Add `Union` and `Optional` to typing.h (#5165)
ab955f15 Fix refcount bug involving trampoline functions with `PyObject *` return type. (#5156)
35ff42b5 Add a pybind function to clear a list. (#5153)
9b3a2000 fix(cmake): improved cross-compilation support (#5083)
b9794be4 chore(deps): update pre-commit hooks (#5154)
1a0ff405 tests: avoid immortal objects in tests (#5150)
7187894e fix(cmake): old cmake boost bug (#5149)
ae6432b8 fix: Python 3.13t with GIL (#5139)
a5b9e50f fix: added check on iterator end position (#5129)
ce08e370 fix: handle NULL correctly (#5145)
86a64290 chore: some cleanup (#5137)
4d0fcedc fix: support Python 3.13.0b1 (PEP 667 fix) (#5127)
b07fddb2 --- (#5130)
aa98d957 chore(deps): update pre-commit hooks (#5123)
ede061ca chore(deps): bump the actions group with 1 update (#5082)
75025779 chore(deps): bump jinja2 from 3.1.3 to 3.1.4 in /docs (#5122)
c9747570 chore(deps): bump idna from 3.6 to 3.7 in /docs (#5121)
6497b3f2 docs(numpy): drop duplicated ndim (#5119)
a9256a6d chore: docs and nox bump (#5071)
f3984794 ci: macos-latest is changing to macos-14 ARM runners (#5109)
19a6b9f4 Fix typo in changelog date (#5096)
f33f6afb chore(deps): update pre-commit hooks (#5084)
7f2214bc chore: bump cmake to 3.29 (#5075)
7af193e7 chore: get back to work
b91b584d docs: remove extra space
01ab9356 Merge branch 'master' into stable
3e9dfa28 docs: a few missed changes for 2.12 (#5074)
6b5674f3 chore: prepare 2.12.0 (#5070)
67c9c568 fix: fully qualify usages of concat to protect against ADL (#4955)
0efff79f Bug fixes: Add missing `handle_type_name` specializations. (#5073)
705efcce feat: make `numpy.h` compatible with both NumPy 1.x and 2.x (#5050)
e0f2c715 tests: hide warning on clang (#5069)
65370f33 Create handle_type_name specialization to type-hint variable length tuples (#5051)
ddb8b67a fix(cmake): allow forcing old FindPython (#5042)
ec73bdaf ci: skipping test for Windows Clang failure (#5062)
8b48ff87 chore(deps): bump the actions group with 3 updates (#5024)
0518bf9f ci: ignore actions/checkout until v5 comes out
e84d446d ci: Ignore v1 updates for checkout (#5023)
416f7a44 chore(deps): update pre-commit hooks (#5018)
768cebe1 doc: add litgen to the automatic generators list (compiling.rst) (#5012)
869cc1ff install mingw-w64-${{matrix.env}}-python-scipy only for mingw64 (#5006)
39e65e10 ci: group dependabot updates (#4986)
31b7e140 bugfix: removing typing and duplicate ``class_`` for KeysView/ValuesView/ItemsView. Fix #4529 (#4985)
aec6cc54 fix(cmake): skip empty PYBIND11_PYTHON_EXECUTABLE_LAST for the first cmake run (#4856)
f29def9e chore(deps): update pre-commit hooks (#4994)
b583336c chore(deps): bump ilammy/msvc-dev-cmd from 1.12.1 to 1.13.0 (#4995)
976fea05 Fix Clazy warnings (#4988)
eeac2f45 chore(deps): bump actions/upload-artifact from 3 to 4 (#4975)
e8a43ea9 chore(deps): bump actions/download-artifact from 3 to 4 (#4976)
dc477fac fix: Use PyObject_VisitManagedDict() of Python 3.13 (#4973)
daea1130 fix(cmake): upgrade maximum supported CMake version to 3.27 (#4786)
7d538a42 fix: make_static_property_type() (#4971)
68322895 chore(deps): bump actions/setup-python from 4 to 5 (#4965)
c1e06f5b chore(deps): update pre-commit hooks (#4963)
a67d7865 fix(stl_bind): Enable `bind_map` with `using` declarations. (#4952)
4bb6163b chore(deps): bump deadsnakes/action from 3.0.1 to 3.1.0 (#4951)
dc9b3959 pybind11.pc: use pcfiledir for relative destinations (#4830)
9591cfb0 fix(cmake): findpython issues and 3.12 support for pybind11_find_import (#4941)
6831666f ci: add more versions of numpy/scipy/pypy (#4714)
6cf90e72 fix(cmake): avoid really slow compile on emscripten (#4642)
b389ae77 chore: update changelog script for categories (#4942)
e250155a Fix a long-standing bug in the handling of Python multiple inheritance (#4762)
2c35fde3 Fix refcount bug introduced with PR #4916. (#4927)
c758b81f chore: move to ruff-format (#4912)
0a974fed chore(deps): update pre-commit hooks (#4923)
f2606930 Use newer PyCode API and other fixes (#4916)
31b0a5d9 fix doc typo
76b7f536 Python_ADDITIONAL_VERSIONS: 3.12 (#4909)
a18c10f6 fix(cmake): make library component optional (#4805)
3aece819 chore: update hooks and Ruff config (#4904)
1e28599e fix: Add missing spaces to error string (#4906)
fa27d2fd Adapt to changed function name in Python 3.13 (#4902)
bf88e29c Bug fix: Replace bare `static exception<T>` with `gil_safe_call_once_and_store`. (#4897)
3414c56b Workaround NVCC parse failure in `cast_op` (#4893)
7969049d Comment out failing job, with link to #4889 (#4890)
74439a64 feature: Use typed iterators in `make_*iterator` (#4876)
0cbd92ba Update pytest to version 7.2.0 (which removes their dependency on py) (#4880)
0e2c3e5d Add pybind11/gil_safe_call_once.h (to fix deadlocks in pybind11/numpy.h) (#4877)
6c772085 chore(deps): bump seanmiddleditch/gha-setup-ninja from 3 to 4 (#4875)
2b2e4ca4 chore(deps): update pre-commit hooks (#4868)
dd64df73 MAINT: Remove np.int_ (#4867)
0a756c0b MAINT: Include `numpy._core` imports (#4857)
f468b070 Add 2 missing `throw error_already_set();` (#4863)
7e5edbc9 Avoid copy in iteration by using const auto & (#4861)
5891867e fix(cmake): support DEBUG_POSTFIX correctly (#4761)
4fb111bd fix(cmake): correctly detect FindPython policy and better warning (#4806)
d06d5369 Fix small bug introduced with PR #4735 (#4845)
8c7b8dd0 fix: Missing typed variants of `iterator` and `iterable` (#4832)
b4573674 Update render for buffer sequence and handle  (#4831)
c9149d99 fix: Use lowercase builtin collection names (#4833)
c8360593 feature: Support move-only iterators in `py::make_*iterator` (#4834)
4a2f7e46 chore(deps): bump actions/checkout from 1 to 4 (#4836)
467fe27b chore(deps): update pre-commit hooks (#4838)
c9638a19 Help Coverty avoid generating a false positive. (#4817)
db412e6e fix: Render `py::function` as `Callable` (#4829)
e705fb5f Fix enum's `__str__` docstring (#4827)
1adac5a5 `PYBIND11_INTERNALS_VERSION` bump for MSVC, piggy-backed on PR #4779. See comments there. (#4819)
76b88581 fix: Different MSVC versions may be ABI incompatible, guard with _MSC_VER (#2898) (#4779)
b9359cea Remove newlines from docstring signature (#4735)
f47ff328 Fix grammar in functions.rst (#4791)
80bcd21f [ci skip] Adopt nanobind config. (#4792)
add281a2 Migrate to readthedocs configuration file v2¶ (#4789)
9039e6ac chore: use 2x faster black mirror (#4784)
4bf60c60 Disable strip when build type is unset (#4454) (#4780)
690a115d Add `py::set_error()`, use in updated `py::exception<>` documentation (#4772)
824dc27a CI: Reenable an NVHPC Test (#4764)
f8703154 Provide better type hints for a variety of generic types (#4259)
9ad7e827 docs: Remove upper bound on pybind11 in example pyproject.toml for setuptools (#4774)
413e6328 chore(deps): update pre-commit hooks (#4770)
17b61430 clang 17 compatibility fixes (#4767)
f3e06028 Add command to check for vX.Y.Z tag vs pybind11/_version.py consistency. (#4757)
8d08dc64 Copy v2.11.1 changelog section as released. (#4755)
8b03ffa7 Merge branch 'v2.11' into stable
8a099e44 Fix version number mishap: actually update 0 to 1 (#4756)
ad6d9293 Merge branch 'v2.11' into stable
2965fa8d Preparation for v2.11.1 patch release (#4752)
99131a85 Provide `PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF` as an option (#4753)
ec1b57c5 Disable `PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF` generally for PyPy (not just PyPy Windows). (#4751)
0620d716 Update README.rst - Add missing comma in the list of acknowlegements (#4750)
e85696e8 Post release version bump (#4747)
0dcf6f28 Merge branch 'v2.11' into stable
1a917f18 docs: preparation for v2.11.0 release (#4744)
b33d06f6 bugfix: fixes a test suite bug in the __new__ example (#4698)
2e5f5c4c fix: support CMake 3.27, drop 3.4 (#4719)
6d22dba8 Warning on comparing wrapper enums with is (#4732)
b2732c6e chore(deps): bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.7 (#4718)
47dc0c4b chore(deps): update pre-commit hooks (#4727)
d462dd91 chore(deps): bump scipy from 1.8.0 to 1.10.0 in /tests (#4731)
782b6281 Drop PyPy 3.7 from GitHub Actions (ci.yml) (#4728)
5ccb9e41 chore: ruff moved to astral-sh (#4726)
2fb3d7cb Trivial refactoring to make the capsule API more user friendly. (#4720)
e10da79b Undo ci.yml gcc10 workaround after docker-library/gcc#95 was resolved. (#4717)
bc1bcf7c chore: 3.12 + cleanup (#4713)
84932280 Systematically add `PIP_BREAK_SYSTEM_PACKAGES` to all .yml files from which pip is called. (#4705)
86f60a0c pre-commit markdown-it-py<3 (for Python 3.7 compatibility) (#4704)
0e43fcc7 Python 3.12b2 testing (#4695)
c679a920 chore(deps): bump deadsnakes/action from 3.0.0 to 3.0.1 (#4687)
3617f355 chore(deps): update pre-commit hooks (#4689)
29487dee Disable 🐍 3 • CentOS7 / PGI 22.9 • x64 (#4691)
d0232b11 Use annotated for array (#4679)
8e1f9d5c Add `format_descriptor<>` & `npy_format_descriptor<>` `PyObject *` specializations. (#4674)
6e6bcca5 Create s Security Policy (#4671)
ce9bbc0a Python 3.11+: Add `__notes__` to `error_already_set::what()` output. (#4678)
19816f0d chore: update changelog, with target date for v2.11.0 release (#4677)
d72ffb44 ci: set minimal permissions to github workflows (#4665)
cca4c51c Update errors in string "Explicit conversions" docs (#4658)
e9b961d9 Elide to-python conversion of setter return values (#4621)
90312a6e Add `type_caster<PyObject>` (#4601)
f7016546 Introduce recursive_container_traits (#4623)
b3e88ecf chore(deps): update pre-commit hooks (#4648)
dff75a62 chore(deps): bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 (#4650)
da919262 fix: remove -stdlib=libc++ from setup helpers, not needed on modern Pythons (#4639)
956390a8 fix(cmake): only define lto if CMAKE's IPO setting is unset (#4643)
5e946c2f chore(deps): update pre-commit hooks (#4605)
3f366ff8 Remove stray comment. (Oversight in PR #4631. Noticed by chance.) (#4641)
6de6191a Use `std::hash<std::type_index>`, `std::equal_to<std::type_index>` everywhere **except when libc++ is in use** (#4319)
ff7f5dfc 1. Fully test unstable ABI (#4635)
07725c28 Introduce `pybind11::detail::is_move_constructible` (#4631)
071f35ab chore(deps): bump jwlawson/actions-setup-cmake from 1.13 to 1.14 (#4632)
ed466da5 chore(deps): bump pypa/gh-action-pypi-publish from 1.8.4 to 1.8.5 (#4604)
7ab88d2e chore(deps): bump pypa/gh-action-pypi-publish from 1.8.3 to 1.8.4 (#4602)
4ce05175 ci: Python 3.12 optional test job (#4575)
654fe926 Introduce `get_python_state_dict()` for Python 3.12 compatibility. (#4570)
1e8b52a9 bugfix: allow noexcept lambdas in C++17. Fix #4565 (#4593)
66f12df0 chore: make #4587 use proper cpp17 feature macro (#4592)
5bbcba54 use C++17 syntax to get rid of recursive template instantiations for concatenating type signatures (#4587)
286873ec chore(deps): bump pypa/gh-action-pypi-publish from 1.8.1 to 1.8.3 (#4584)
be97c5a9 Merge branch 'v2.10' into stable
cf7d2e6f Change `always_forkserver_on_unix()` to `use_multiprocessing_forkserver_on_linux()` (#4577)
5b0a6fc2 chore: bump version to 3.10.4
3f5a7e55 docs: changelog for 2.10.4 (#4532)
ec3f6e24 chore(deps): bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.1 (#4576)
c4c15d4b docs: changelog for 2.10.4 (#4532)
04ef4e42 chore(deps): bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.1 (#4576)
442261da Remove test code that does not exercise anything in pybind11, but breaks between Python 3.12alpha3 (still working) and 3.12alpha6 (broken): (#4559)
cbb876cc chore(deps): update pre-commit hooks (#4552)
882cb769 add --version option to pybind11-config (#4526)
b596235f Inconsistent comments between 2 templates of `unchecked()`. (#4519)
f5cff4f2 fix: nicer stack level for warning (#4516)
9a1eeed0 Make warning suppressions MINGW-specific again. (#4515)
c773a02a Appease new flake8 B028 error: (#4513)
1cae8dc0 fix: tests dir has started to show up in packaging (#4510)
1f4cf8fe Replace "whitelist" with "allowlist" (#4506)
3ea37d04 chore(deps): update pre-commit hooks (#4495)
c06f324c chore(deps): bump ilammy/msvc-dev-cmd from 1.12.0 to 1.12.1 (#4493)
a491af61 bugfix: delete proper ctors in gil.h (#4490)
993eb2b6 chore: update to black 23 (#4482)
c0e2eeba Bump isort version to 5.12.0 (#4480)
5ece09ad Resolve new flake8 error (#4462)
da780a00 Make sure to properly untrack gc objects before freeing them (#4461)
4f6183cf Ensure `import pybind11_tests` traceback is shown. (#4455)
f14bb03d Add clang15 C++20 job (#4443)
0ed64a04 docs: fixed typo in spelling of first (#4428)
3cc7e425 add --version option to pybind11-config (#4526)
438034c5 chore: move to Ruff and add rules (#4483)
a19daeac Inconsistent comments between 2 templates of `unchecked()`. (#4519)
68211d41 fix: nicer stack level for warning (#4516)
6a5e6007 Make warning suppressions MINGW-specific again. (#4515)
d1956eab Appease new flake8 B028 error: (#4513)
08a4a47a Revert "Go back to CMake 3.25.2 (#4496)" (#4503)
535f81a1 fix: tests dir has started to show up in packaging (#4510)
8dcced29 Always display python type information in cast errors (#4463)
531144dd Replace "whitelist" with "allowlist" (#4506)
b8f28551 Go back to CMake 3.25.2 (#4496)
f8713ec4 Revert "bugfix: Keep registered types until after Py_Finalize(). Fix #4459 (#4486)" (#4501)
8a90b367 chore(deps): update pre-commit hooks (#4495)
b2c1978c bugfix: Keep registered types until after Py_Finalize(). Fix #4459 (#4486)
9ef65cee chore(deps): bump ilammy/msvc-dev-cmd from 1.12.0 to 1.12.1 (#4493)
08a89fac bugfix: delete proper ctors in gil.h (#4490)
3efe9d4c chore: update to black 23 (#4482)
44e93682 Use PyConfig_InitPythonConfig instead of PyConfig_InitIsolatedConfig (#4473)
c71e3af7 Bump isort version to 5.12.0 (#4480)
a500f439 Resolve new flake8 error (#4462)
c709d2a8 Make sure to properly untrack gc objects before freeing them (#4461)
e53d58af Ensure `import pybind11_tests` traceback is shown. (#4455)
d821788b Add clang15 C++20 job (#4443)
a34596bf chore: back to work
12852cd3 Merge branch 'v2.10' into stable
0bd8896a chore: prepare for 2.10.3 (#4437)
b2d7ad72 chore: prepare for 2.10.3 (#4437)
d78de295 chore(deps): update pre-commit hooks (#4439)
9d6a79c0 fix: issuses detected by static analyzer (#4440)
050de893 ci: remove clang 10 C++20 (it broke recently) (#4438)
0abe64c5 Fix `detail::obj_class_name()` to work correctly for meta classes. (#4436)
769fd3b8 chore(deps): update pre-commit hooks (#4439)
e3e24f3f fix: issuses detected by static analyzer (#4440)
6da268a5 ci: remove clang 10 C++20 (it broke recently) (#4438)
f12e098f Fix `detail::obj_class_name()` to work correctly for meta classes. (#4436)
e414c4bd fix: improve the error reporting for inc_ref GIL failures (#4427)
60f02f5f fix: improve the error reporting for inc_ref GIL failures (#4427)
2de6e398 [v2.10] Revert the addition of the GIL check feature (#4432)
70af9873 docs: fixed typo in spelling of first (#4428)
7f23e9f3 chore: update clang-tidy to 15 (#4387)
03764178 Merge branch 'master' into v2.10
d36a41ea Merge branch 'master' into stable
0694ec6a chore: preapre for 2.10.2 release (#4414)
3fd1520d docs: changelog for next version (#4413)
ee4b9f5d Fix ODR violations in our Eigen Tensor tests (#4412)
a97c4d22 fix(cmake): support Windows ARM cross-compilation (#4406)
09db6445 IPO/LTO support for ICX (IntelLLVM) compiler (#4402)
ece1206b ci: set `env: VERBOSE: 1` (#4405)
89c3561d Fix multi-context new Python linking mode (#4401)
ff42f525 Systematically add `-DCMAKE_VERBOSE_MAKEFILE=ON` to obtain full command lines related to `-Wodr` (#4398)
9727dcda chore: future safe bugbear opinionated warnings (#4393)
663b86c2 Add flake8 `B905` to `extend-ignore` in setup.cfg (#4391)
9db98801 Correct class names for KeysView, ValuesView and ItemsView in bind_map (#4353)
00126859 Add option for enable/disable enum members in docstring. (#2768)
65374c8e `pybind11::handle` `inc_ref()` & `dec_ref()` `PyGILState_Check()` **excluding** `nullptr` (#4246)
65cc9d2a chore(deps): bump pypa/gh-action-pypi-publish from 1.6.1 to 1.6.4 (#4389)
4768a6f8 chore(deps): update pre-commit hooks (#4386)
a672de7c Fix source comment typo (#4388)
a6e75e4d chore(deps): bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.1 (#4384)
6a1023e3 chore(deps): bump deadsnakes/action from 2.1.1 to 3.0.0 (#4383)
5b55f8fe Replace `ubuntu-latest` with `ubuntu-22.04` (#4382)
e133c33d chore: Convert direct multiprocessing.set_start_method("forkserver") call to a pytest fixture. (#4377)
358ba459 Fix test added with PR #4330 (#4372)
b14d58b6 chore(deps): bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2 (#4370)
88699849 scoped_interpreter. overloaded constructor: PyConfig param (#4330)
06003e82 Introduce a new style of warning suppression based on push/pop (#4285)
9907bedc fix(.github): fix bug-report issue template (#4363)
9c18a74e Use `multiprocessing` `start_method` `"forkserver"` (#4306)
48949222 Use `PyEval_InitThreads()` as intended (#4350)
296615ad Add macos_brew_install_llvm to ci.yml (#4326)
88b019a8 fix pybind11Tools.cmake typo causing Unknown arguments (#4327)
1f04cc70 Add windows_clang to ci.yml (#4323)
ee2b5226 Fix functional.h bug + introduce test to verify that it is fixed (#4254)
0176632e chore: sync blacken-docs hook with black (#4304)
2441d25b chore(deps): update pre-commit hooks (#4302)
5b632229 Merge branch 'v2.10' into stable
80dc998e chore: bump versions for 2.10.1
f2ee641e docs: prepare for 2.10.1 release (#4279)
3fb36a99 fix: unicode surrogate character in Python exception message. (#4297)
252ed8fb docs: prepare for 2.10.1 release (#4279)
b1bd7f26 fix: define (non-empty) `PYBIND11_EXPORT_EXCEPTION` only under macOS. (#4298)
3a2c96bd fix: unicode surrogate character in Python exception message. (#4297)
15fde1de Add `PYBIND11_SIMPLE_GIL_MANAGEMENT` option (cmake, C++ define) (#4216)
5b395c9b fix: improve bytes to str decoding error handling (#4294)
5bc0943e Ensure config, build, toolchain, spelling, etc. issues are not masked. (#4255)
b07d08f6 Add `PYBIND11_SIMPLE_GIL_MANAGEMENT` option (cmake, C++ define) (#4216)
b07223fa fix: improve bytes to str decoding error handling (#4294)
738a6f83 ci: move to final release of 3.11 (#4286)
fcb5554d ci: move to final release of 3.11 (#4286)
1f187d9a Fix char8_t support (#4278)
0e82c360 fix: add flag for overriding classic Python search values (#4195)
07a61aa1 Fix char8_t support (#4278)
d1c31e9a chore: improve issue template (#4276)
4fe905d4 fix: add flag for overriding classic Python search values (#4195)
ce63bcb9 Fix casts to void* (#4275)
8ea75ab4 Fix casts to void* (#4275)
305c4711 fix: Revert pfect args make iterator (#4234)
17c1e27b fix: Revert pfect args make iterator (#4234)
eaa5f7bd Revert "feat: add entrypoint for cmake modules dir" (#4270)
251516bc Cleanup casters to release none() to avoid ref counting (#4269)
91cfb770 Revert "feat: add entrypoint for cmake modules dir" (#4270)
2ce76f78 Cleanup casters to release none() to avoid ref counting (#4269)
a8f21107 docs: update changelog (#4265)
36ccb08b docs: update changelog (#4265)
412918d1 feat: add entrypoint for cmake modules dir (#4258)
128d988e ci: fix labeler
1d4a65e2 feat: add entrypoint for cmake modules dir (#4258)
c3854682 ci(fix): don't label weekly dep updates & ci fixes (#4264)
895fc663 ci: update PGI build (old one no longer signed) (#4260)
17c68091 ci: update PGI build (old one no longer signed) (#4260)
fab1eebe First draft of Eigen::Tensor support (#4201)
b926396b bugfix: py contains raises errors when appropiate (#4209)
5b5547bc chore(deps): bump ilammy/msvc-dev-cmd from 1.11.0 to 1.12.0 (#4242)
964c4997 Minor `py::capsule` cleanup. No functional change. (#4238)
8781daf6 chore: Optimize iterator advance() call (#4237)
0927c4d1 chore: Improve PyCapsule exception handling (#4232)
ff7b6971 chore(deps): bump jwlawson/actions-setup-cmake from 1.12 to 1.13 (#4233)
da104a9e Reproducer and fix for issue encountered in smart_holder update. (#4228)
7c6f2f80 fix: PyCapsule_GetDestructor is allowed to return a nullptr destructor (#4221)
4a421562 test_eigen.py test_nonunit_stride_to_python bug fix (ASAN failure) (#4217)
6cb21474 fix: NVCC 11.4.0 - 11.8.0 host bug workaround (#4220)
864ed112 chore: steal arg_v.value from copied arg in unpacking_collector (#4219)
8275b769 ci: update pre-commit schedule (#4212)
600d6976 [pre-commit.ci] pre-commit autoupdate (#4210)
c78dfe69 bugfix: Add error checking to list append and insert (#4208)
da8c730a [pre-commit.ci] pre-commit autoupdate (#4197)
5aa0fad5 perf: call reserve method in set and map casters (#4194)
f743bdf8 Avoid local_internals destruction (#4192)
95d0e71a test C++14 on MSVC (#4191)
424ac4fe fix: Windows compiler, missing object initializer (#4188)
d02f219f [pre-commit.ci] pre-commit autoupdate (#4189)
9c04c7b0 chore: Delete copy ctor/assign for GIL RAIIs (#4183)
1874f8fa Clarify GIL documentation (#4057)
8524b20c fix: Python-3.12 compatibility (#4168)
64f72818 [pre-commit.ci] pre-commit autoupdate (#4178)
aa8f8baa [pre-commit.ci] pre-commit autoupdate (#4171)
8756f16e [pre-commit.ci] pre-commit autoupdate (#4151)
283f10dc chore(deps): bump ilammy/msvc-dev-cmd from 1.10.0 to 1.11.0 (#4161)
0b4c1bc2 test: ConstructorStats newline (PyPy) (#4167)
fac23b6f `error_fetch_and_normalize`: PyPy 7.3.10+ does not need the PR #4079 workaround anymore. (#4154)
a48ec3e8 Words matter updates (#4155)
68e6fdaa embed.h Python 3.11 `config.use_environment=1` + `PYTHONPATH` test (#4119)
81f35d29 chore: Mark detail:forward_like as constexpr (#4147)
2d59b43c Qualify detail::forward_like to avoid conflict. (#4136)
b884b9dc chore: Add pytests for constructing pytypes from iterable (#4138)
bbb89da1 fix(cmake): support vcpkg, try 2 (#4123)
5bdd3d59 feat(cmake): add installation support for pkg-config dependency detection (#4077)
14c84654 [pre-commit.ci] pre-commit autoupdate (#4126)
6abb7de6 chore: Use PyObject_GenericGetDict and PyObject_GenericSetDict functions (#4106)
8a4bca82 fix(cmake): use case-insensitive CMAKE_BUILD_TYPE comparisons (#4078)
29f4940c Fix copy-paste oversight (#4118)
ba5ccd84 [pre-commit.ci] pre-commit autoupdate (#4104)
88a1bb92 chore: remove unnecessary temporary std::pair (#4103)
f8e8403b Open pybind11 namespace with consistent visility. (#4098)
aa953710 [pre-commit.ci] pre-commit autoupdate (#4090)
36655302 Add `-DPYBIND11_WERROR=ON` to mingw cmake commands (#4073)
1e3400b6 chore(deps): bump pypa/gh-action-pypi-publish from 1.5.0 to 1.5.1 (#4091)
d70f54b0 docs: Missing semicolons (#4094)
b07975f4 Fix missing undef in pytypes (#4087)
9a296373 More systematic gcc & clang coverage (#4083)
cb35a3c1 For PyPy only, re-enable old behavior (runs the risk of masking bugs) (#4079)
42b54507 chore: use explicit defaulting in pyobject macros (#4017)
f47f1edf Fix #3812 and fix const of inplace assignments (#4065)
ef7d971e [pre-commit.ci] pre-commit autoupdate (#4082)
59f03ee3 tests: include pypy3.9 in nox if present
5116a629 fix(spelling): PYTHON_VERSIONS
8d82f298 chore: back to work
0ba639d6 Merge branch 'master' into stable
aa304c9c chore: preapre for 2.10.0 release (#4068)
87f64c43 docs: update changelog for 2.10.0 (#4066)
1d811910 Disable implicit conversion of `0` to `pybind11::handle`. (#4008)
bc9315fe chore: optimize sparse matrix casting with python tuple (#4064)
6b60d97d docs: use Furo (#3109)
7c3a0317 chore: bump clang-tidy to 13 (#3997)
023b3f32 Undo accidental one-line change under PR #3913 (#4060)
790241bc [pre-commit.ci] pre-commit autoupdate (#4058)
f9f00495 Properly visit self in >=3.9 traverse (#4051)
432bc5cf Add `std::string clean_type_id(const char *typeid_name)` overload (in namespace detail). (#4049)
85bc0884 Report `C++ Info:` via `pytest_report_header()` (#4046)
cd08869d PYBIND11_NAMESPACE consistency fixes. (#4043)
0ab1fcfb docs: update changelog (#4042)
2af163d9 Fix: 3.11 beta support (#3923)
c42e3ab7 [pre-commit.ci] pre-commit autoupdate (#4041)
bc1f9f9b chore(deps): bump actions/setup-python from 3 to 4 (#3999)
5a3a1e34 chore: simpler dependabot (#4035)
479e9a50 Fix arrays with zero-size dimensions (#4038)
374a5b00 [docs] Fix "Enumerations and internal types" example (#4034)
dd3bf7fd [pre-commit.ci] pre-commit autoupdate (#4030)
c3e9173f ci: use almalinux instead of centos, add 9 (#4020)
2ad974c9 [pre-commit.ci] pre-commit autoupdate (#4021)
0964a909 Add a missing std::move in numpy.h (#4005)
21f0e72b [pre-commit.ci] pre-commit autoupdate (#4003)
0e956a2e chore(deps): bump pre-commit/action from 2.0.3 to 3.0.0 (#3992)
e2dcd954 chore: optimize dictionary access in strip_padding numpy (#3994)
918892b9 Make dtype::num() return type consistent with other functions (#3995)
c5fa3436 [pre-commit.ci] pre-commit autoupdate (#3951)
554c0453 enable two new clang-tidy checks (#3988)
42a41bf3 remove useless ctor (#3989)
a05bc3d2 error_already_set::what() is now constructed lazily (#1895)
58802de4 perf: Add object rvalue overload for accessors. Enables reference stealing (#3970)
9f7b3f73 addl unit tests for PR #3970 (#3977)
b24c5ed2 Replace "Unknown internal error occurred" with a more helpful message. (#3982)
de4ba92c Add `error_scope` to `detail::get_internals()` (#3981)
8da58da5 chore: perfectly forward all make_iterator args (#3980)
748ae227 Add missing error handling to `module_::def_submodule` (#3973)
68f80105 chore: add err guard to capsule destructor and add a move to iostream (#3958)
8d14e666 fix: avoid `catch (...)` for expected `import numpy` failures (#3974)
2c549eb7 Move `PyErr_NormalizeException()` up a few lines (#3971)
2d4a20c8 chore: add missing moves for buffer_func and staticmethod in pybind11.h (#3969)
4624e8e1 Don't return pointers to static objects with return_value_policy::take_ownership. (#3946)
c42414db (perf): use a rvalue cast in func_wrapper (#3966)
918d4481 fix(cmake): support cross-compiles with classic Python (#3959)
1e4bd22b fix(cmake): support release and debug at the same time (#3948)
a8b3ff30 chore: add a couple of moves in pybind11.h (#3941)
dff6fa05 fix(cmake): avoid issue with NVCC + Windows (#3947)
1a7b1298 ci: fix cuda issue & MSVC spurious warning (#3950)
72eea20a Fix py::cast from pytype rvalue to pytype (#3949)
48c7be4a Undoing previous accidental commit. Sorry I forgot to git branch.
5621ab85 Do we have a unit test for the traceback code in error_string()?
ad146b2a [pre-commit.ci] pre-commit autoupdate (#3933)
2e331308 chore: remove unused include from stl.h (#3928)
68a0b2df Add anyset & frozenset, enable copying (cast) to std::set (#3901)
9a16e55a [pre-commit.ci] pre-commit autoupdate (#3903)
f306012b fix: file extension on windows with cp36 and cp37 (#3919)
bdc7dd8c chore: update NVIDIA-PGI CI workflow (#3922)
287e4f23 Test pickling a simple callable (does not work). (#3906)
f0b9f755 Replace error printing code gated by NDEBUG with a new flag: PYBIND11_DETAILED_ERROR_MESSAGES  (#3913)
75007dda chore: rule of 3 for strdup guard (#3905)
9bc27044 Add tests for cast from tuple to sequence containers (#3900)
03252067 chore(deps): bump actions/upload-artifact from 2 to 3 (#3899)
be4a634c chore(deps): bump actions/checkout from 2 to 3 (#3896)
82455a41 Minor opt to cache tuple casting (#3894)
2a7cb008 chore(deps): bump actions/download-artifact from 2 to 3 (#3897)
e79293cf chore(deps): bump actions/cache from 2 to 3 (#3898)
b58b772b chore(deps): bump actions/setup-python from 2 to 3 (#3895)
1a8603e4 ci: dependabot major versions for official actions (#3888)
e8e229fa [pre-commit.ci] pre-commit autoupdate (#3885)
1c636f4d chore: Change numpy dtype from_args call sig to const ref (#3878)
fbcde3f0 chore: enable clang-tidy check modernize-use-nullptr (#3881)
30716c67 Also add error_scope assignment operator to complete the rule-of-3 (follow-on to PR #3870). (#3872)
3829b762 chore: simplify numpy dtype ctor (#3869)
45164c1f Added deleted copy constructor for error_scope to comply with rule of 3. (#3870)
ba7a0fac Expand dtype accessors (#3868)
fa98804a Adds set_name method of pybind11::capsule class (#3866)
ad0de0f5 [pre-commit.ci] pre-commit autoupdate (#3863)
9969f3b5 ci: drop win2016 (#3854)
088ad4f2 Cleanup cast_safe<void> specialization (#3861)
e3aa215b Add perfect forwarding to make_iterator calls (#3860)
1b27b744 chore: Make stl_bind take slice as const_ref (#3852)
ab59f45d Prefer make_caster<T> to type_caster<T> (#3859)
c4e29528 perf: Add more moves and optimize (#3845)
f2f0c690 [pre-commit.ci] pre-commit autoupdate (#3848)
b3ebd11d feature: support compilers that use std::experimental::filesystem  (#3840)
914c06fb chore: set to version 2.9.2
5c2b53b5 chore: bump changelog for 2.9.2 (#3834)
65ec5de5 chore: bump changelog for 2.9.2 (#3834)
42d8593a style: bump black (#3831)
3a183d4b fix: improve str exceptions and consistency with python (#3826)
7742be02 Revert "ci: test pypy 3.9" (#3828)
461937d3 ci: test pypy 3.9 (#3789)
146695a9 fix: better exception and error handling for capsules (#3825)
47079b9e (perf): Add missing move in sp matrix caster and microopt char concats (#3823)
b22ee64c Add type_caster<std::monostate> (#3818)
67089cd3 [pre-commit.ci] pre-commit autoupdate (#3817)
b3a43d13 Use rvalue reference for std::variant cast_op<T> (#3811)
8b1944d3 Remove idioms in code comments (#3809)
a7e7a6e8 Docs: No Strip in Debug (#3779)
f8a532a7 [pre-commit.ci] pre-commit autoupdate (#3800)
91a6e129 PYBIND11_OBJECT_CVT should use namespace for error_already_set() (#3797)
d75b3536 CI: MSVC Debug Build (#3784)
dd617dec fix: missing move in eval.h (#3775)
45219c6b fix: potential memory leak in pypy (#3774)
6f01c60a Improve Python 3.11 support (#3694)
bdec5737 Use sysconfig in Python >= 3.10 (#3764)
80589625 ci: fix PyPy (#3768)
42455b5e fix: clear local internals after finalizing interpreter #2101 (#3744)
93d68dd9 cast: Qualify symbol usage in PYBIND11_TYPE_CASTER (#3758)
5327c199 docs: Correct minor typos (#3721)
8c859e48 fix: minor CMake warning fix for unused variable (#3718)
2dd52544 fix: missing move in eval.h (#3775)
af08a95b fix: potential memory leak in pypy (#3774)
42a8e312 Improve Python 3.11 support (#3694)
465b2e0b Use sysconfig in Python >= 3.10 (#3764)
5f9b090a ci: fix PyPy (#3768)
061c6177 [pre-commit.ci] pre-commit autoupdate (#3765)
f495dfc4 cast: Qualify symbol usage in PYBIND11_TYPE_CASTER (#3758)
da15bb20 Cast bytearray to string  (#3707)
91f597be [pre-commit.ci] pre-commit autoupdate (#3754)
9aa676d3 fix: clear local internals after finalizing interpreter #2101 (#3744)
44596bc4 Fix exception handling when pybind11::weakref() fails. (#3739)
009ffc33 MSVC C++20 test_eigen (#3741)
4b42c371 style: pylint (#3720)
c14170a7 Removing `// clang-format off` - `on` directives from test_pickling.cpp (#3738)
0986af61 [pre-commit.ci] pre-commit autoupdate (#3672)
a25d40c7 tests: use 'build' in tests instead of running setup.py (#3734)
a97e9d8c Dropping MSVC 2015 (#3722)
44156477 Adding MSVC 2022 C++20 GitHub Action (#3732)
522c59ce chore: drop Python 3.5 (#3719)
1a432b42 docs: Correct minor typos (#3721)
6493f496 Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688)
46dcd9bc fix: minor CMake warning fix for unused variable (#3718)
ec24786e Fully-automatic clang-format with include reordering (#3713)
e96221be Final manual curation in preparation for global `clang-format`ing (#3712)
d6c66d25 chore(clang-tidy): Add clang-tidy rules: prefer-member-initializer and optin.performance.Padding (#3716)
dc9803ce Add missing clang-tidy fixes (#3715)
7f975816 chore(clang-tidy): Enable static downcast and decl naming check (#3709)
abc38690 Manually applying two clang-format changes that need fix-ups for clang-tidy. (#3705)
7769e771 clang-tidy readability-qualified-auto (#3702)
b4f5350d chore: use member initializer (#3704)
ddbc74c6 Adding .clang-tidy readability-braces-around-statements option.
8581584e Manual fix-ups in preparation for clang-tidy readability-braces-around-statements.
af056b65 fix: __index__ on Enum should always be present. (#3700)
1b841883 Minor change to improve readability (#3695)
96b943be tests: update catch to 2.13.5 to fix glibc 2.34 failures (#3679)
94a94872 docs: fix imported target name (#3689)
36813cfa chore: back to work
1d3b04e8 test: Strip whitespace when comparing numpy dtypes for 1.22 compat (#3682)
ffa34686 chore: bump to 2.9.1
3899dc65 Documenting missing unit test coverage. (#3673)
0f6ad910 docs: update changelog for 2.9.1 (#3670)
21e10945 ci: move centos 8 to stream (#3675)
ce18721d Ensure TypeError use raise_from for C++->Python overload res. (#3671)
978617f6 fix issue 3668 by removing bool casts in numpy.h (#3669)
3a8d9230 Fix caster optimization regression introduced in #3650 (#3659)
bf7e5f92 fix(setup): support overriding CMake args (#3577)
dc4717ba fix: module extension detection for python 3.10 (#3663)
07103d65 Remove extra semicolon (#3666)
17792884 Document how to bind templates (#3665)
ec81e8e7 Propagate py::multiple_inheritance to all children (#3650)
bcb6d63c fix msys ci python issue (#3651)
dedda228 Fix a typo in class.rst (#3648)
9ec1128c Fix typo in doc (#3628)
3a1eddab chore(deps): bump jwlawson/actions-setup-cmake from 1.11 to 1.12 (#3625)
51948559 Render `py::bool_` and `py::float_` without `_` in docstrings (#3622)
7e7c5585 Fixing obvious minor typo (missing `D` in `-DOWNLOAD_EIGEN=ON`).
d2ec8367 Add support for nested C++11 exceptions (#3608)
f8d4aa47 Add clang-tidy readability checks for sus args (#3611)
21911e12 A way to register additional test targets and support .py only tests. (#3590)
d434b5f3 (chore): Remove deprecated c-headers (#3610)
f5888108 Replacing ICC C++14 with C++17 (#3570)
ef070f77 Add additional info to TypeError when C++->Python casting fails (#3605)
b66328b0 [pre-commit.ci] pre-commit autoupdate (#3609)
fb9a222d chore(deps): bump pypa/gh-action-pypi-publish from 1.4.2 to 1.5.0 (#3606)
2cd32e5d [pre-commit.ci] pre-commit autoupdate (#3589)
1bbaeb34 Adding dedicated test_const_name. (#3578)
9b4f71d1 docs: remove duplication in changelog for 2.9.0
93716147 Merge branch 'master' into stable
45f792ef chore: prepare for 2.9
89769e6e [pre-commit.ci] pre-commit autoupdate (#3574)
cb302305 fix: restore full range of _ functions (#3571)
d4b9f347 docs: update changelog (#3556)
e50f841d fix: do not use LTS on mips64 and ppc64le (#3557)
39fbc799 fix: avoiding usage of _ if already defined (#3423)
b3d9c354 vi: replacing currently broken ICC Latest C++17 with C++14. (#3551)
d0406c74 [pre-commit.ci] pre-commit autoupdate (#3563)
75168113 fix(setup_helpers): ensure ThreadPool is closed (#3548)
59aa9986 [pre-commit.ci] pre-commit autoupdate (#3533)
a224d0cc fix: vs2022 compilation, issue #3477 (#3497)
b4939fcb Expand std::string_view support to str, bytes, memoryview (#3521)
cd176cee chore: update changelog with recent PRs (#3524)
70a58c57 Replace usage of deprecated Eigen class MappedSparseMatrix. (#3499)
fe65693c [pre-commit.ci] pre-commit autoupdate (#3500)
5d067e87 fix: remove redundant copy operation to fix warning (#3486)
9281faf4 Fixing `stict` vs `strict` typo. (#3493)
673b4be3 Fix py::kw_only when used before the first arg of a method (#3488)
56322daf fixed include for filesystem::path (#3482)
15f8d7c1 fix(build): cleaner CMake printouts & IDE folders (#3479)
ff51fcb7 docs: fix broken link (again)
72282f75 ci: support development releases of Python (#3419)
1eb59963 Removed duplicated word in docs/advanced/exceptions.rst (#3476)
d2b21316 cmake: report version type in the version string (#3472)
9422d98f [pre-commit.ci] pre-commit autoupdate (#3473)
afdc09de [master] Wrong caching of overrides  (#3465)
270b11d5 Revert "style: drop pycln" (#3466)
e450eb62 Removed duplicated word in docs/advanced/cast/eigen.rst (#3458)
aebd21b5 docs: rework CI a bit, more modern skipping (#3424)
b11ff912 fix(setup =_helpers): don't add -g0 CFLAGS sets -g (#3436)
b322018e [pre-commit.ci] pre-commit autoupdate (#3449)
01f938e7 fix: add missing std::forward calls (#3443)
a61e354e docs: touch up manual release suggestion (#3422)
6de30d31 [pre-commit.ci] pre-commit autoupdate (#3432)
dd2d1272 Correct "which" versus "that" error. (#3430)
e7c9753f feat: allow kw-only args after a py::args (#3402)
a80b2237 chore: get back to work after 2.8.1
acae9301 Merge branch 'master' into stable
f7b49961 [skip ci] Tweaks in preparation for the 2.8.1 release. (#3421)
f1594cb9 docs: changelog update for 2.8.1 (#3416)
90707b46 fix(build): support conan's multiple includes of all files (#3420)
e7e2c79f fix: improve support for Python 3.11-dev (#3368)
c2d3e220 fix: the types for return_value_policy_override in optional_caster (#3376)
d45a8810 [pre-commit.ci] pre-commit autoupdate (#3409)
9379b399 fix: MSVC 2017 C++17 on Python 3 regression (#3407)
78ee782b feat: Add C++ binding to throw AttributeError (#3387)
076c89fc tests: test recursive dispatch using visitor pattern (#3365)
606f81a9 style: drop pycln (#3397)
2d6014e4 docs: fix minor typo (#3390)
f791dc86 fix: deprecate make_simple_namespace, fix Python 3.11 (#3374)
931f6644 ci: cancel in-progress on repeated pushes (#3370)
56b49c2b ci: fix mingw checks by pinning (#3375)
7c580586 Correct options on Eigen::MappedSparseMatrix & adding MSVC C4127 suppression around Eigen includes. (#3352)
02c05573 [pre-commit.ci] pre-commit autoupdate (#3353)
8a7c266d Fix make_key_iterator/make_value_iterator for prvalue iterators (#3348)
750e38dc Update eval.h (#3344)
f4c81e08 maint: Add additional linter-related pre-commit hooks (#3337)
ed09664f chore(deps): bump ilammy/msvc-dev-cmd from 1.9.0 to 1.10.0 (#3338)
47ed124f Fix some formatting in the v2.8.0 changelog (#3339)
ba9f919b chore: get back to work after 2.8.0
e315e1fe Merge branch 'master' into stable
97976c16 [pre-commit.ci] pre-commit autoupdate (#3325)
3747dc2c Revert "All `-DDOWNLOAD_EIGEN=OFF` (to work around gitlab eigen outage)." (#3326)
c9a319c6 chore: version 2.8.0 final
20aae3e6 ci: disable Eigen due to Cert issue on CentOS
591db0b9 docs: update CHANGELOG for 2.8
9f146a56 All `-DDOWNLOAD_EIGEN=OFF` (to work around gitlab eigen outage).
d7a7edc1 tests: support Eigen configuration
ad966556 fix: replace free() with std::free() (#3321)
b3573ac9 feat: add `.keys` and `.values` to bind_map (#3310)
b4e1ab8c Docs: Demonstrate non-enum internal types in example (#3314)
a1830d5e docs: mention title conventions in PR template (#3313)
c9bbf8d2 docs: fix minor typo (#3311)
71fd5241 docs: fix minor typo (#3311)
6be64304 [pre-commit.ci] pre-commit autoupdate (#3312)
6bce3bd7 docs: update CHANGELOG (#3304)
d58699c9 fix(cmake): reduce chance for variable collision (#3302)
62c4909c Add `custom_type_setup` attribute (#3287)
409be833 CMake: react to python version changes
6ad3f874 fix(build): avoid a possible warning about shadowed variables and changing behaviors (#3220)
21282e64 feat: reapply fixed version of #3271 (#3293)
2a78abff Ensure PYBIND11_TLS_REPLACE_VALUE evaluates its arguments only once (#3290)
5f46e47d tests: check simple iteration of pairs (#3296)
2fa3fcfd Revert "Add make_value_iterator (#3271)"
1dc9a23c chore(deps): bump jwlawson/actions-setup-cmake from 1.10 to 1.11 (#3294)
b06a6f4f feat: Slice allowing None with py::object or std::optional (#1101)
0fb981b2 Add blacken-docs and pycln pre-commit hooks (#3292)
ee0c5ee4 Add make_value_iterator (#3271)
077a16e9 [pre-commit.ci] pre-commit autoupdate (#3286)
6e6975e2 Fix test case with __new__ (#3285)
d0f3c51f Enable defining custom __new__ (#3265)
14976c85 Eliminate duplicate TLS keys for loader_life_support stack (#3275)
04dd3262 docs: update CHANGELOG (#3276)
e0031bfc include/pybind11/numpy.h: gcc 4.8.4 does not have is_trivially_copyable (#3270)
3ed31e92 [pre-commit.ci] pre-commit autoupdate (#3266)
6c65ab59 Follow-on to PR #3254, to address user code breakages. (#3263)
9978ed58 Fix capsule bug (#3261)
0e599589 Fix thread safety for pybind11 loader_life_support (#3237)
121b91f9 Fixing NOLINT mishap (#3260)
ae07d4c6 maint(Clang-Tidy): readability-const-return (#3254)
4d5ad03e Avoid use of temporary `bytes` object in string_caster for UTF-8 (#3257)
4c6bee35 fix: Set __file__ constant when using eval_file (#1300) (#3233)
6abf2baa CodeHealth: Enabling clang-tidy google-explicit-constructor (#3250)
39a0aac8 docs fix to avoid nonexistent SmartCompile (#3241)
d71ba0cb (perf): Add a missing noexcept to a pytype constructor (#3236)
49173e47 Minor follow-on to PR #1334 (Fix enum value's __int__ returning non-int when underlying type is bool or of char type) (#3232)
a46f6237 Minor tweaks. (#3230)
d6474ed7 fix: memory leak in cpp_function (#3228) (#3229)
76d939de [pre-commit.ci] pre-commit autoupdate (#3231)
777352fc Adding `ssize_t_cast` to support passing `size_t` or `ssize_t` values where `ssize_t` is needed. (#3219)
cb60ed49 Fix enum value's __int__ returning non-int when underlying type is bool or of char type (#1334)
930bb16c Call PySys_SetArgv when initializing interpreter. (#2341)
503ff2a6 view for numpy arrays (#987)
db44afa3 tests: fix pytest usage on Python 3.10 (#3221)
59ad1e7d reshape for numpy arrays (#984)
031a700d Add make_simple_namespace function and tests (#2840)
c8ce4b8d Clone of @virtuald's PR #2112 with minor enhancements. (#3215)
6cbabc4b maint(clang-tidy): Enable cpp-coreguideline slicing checks (#3210)
fdac5fbf chore: support targeting different Python versions with nox (#3214)
b3d18f38 [pre-commit.ci] pre-commit autoupdate (#3213)
4f29b8a4 ci: extend msys2 mingw CI (#3207)
998d45e4 Cleanup of file-scoped and globally-scoped warning suppression pragmas across pybind11 header files. (#3201)
774b5ff9 Removing obsolete eigen.h warning suppression pragmas. (#3198)
617cb653 [Bugfix] Fix errant const methods (#3194)
1bcd94c4 Removing last remnants of pragma block at the top of pybind11.h (#3186)
9df2f1ff maint(precommit): Apply isort (#3195)
d6841f60 chore(deps): bump jwlawson/actions-setup-cmake from 1.9 to 1.10 (#3196)
7d3b0571 Improved workaround for Centos 8 failure (follow-on to PR #3030). (#3193)
0be2ea06 [pre-commit.ci] pre-commit autoupdate (#3185)
4c7e509f PYBIND11_NOINLINE-related cleanup. (#3179)
ff590c12 maint(perf): Optimize Numpy constructor to remove copies by value. (#3183)
61ee923b Consistent step name "Python tests". (#3180)
6ac8efe5 test_eval: Show example of working closure (#2743)
af700733 Removing GCC -Wunused-but-set-parameter from pragma block at the top of pybind11.h (#3164)
3893f37b maint(clang-tidy): Bugprone enable checks (#3166)
089328f7 Revert "fix: apply simpler expression with fewer workarounds"
1fafd1b4 fix: apply simpler expression with fewer workarounds
5f4d7259 fix: version number hex
c30f57d2 chore: start development for 2.8.0
787d2c88 fix: include hex version in bump
82adacb3 fix: include hex version in bump
5f34c42d chore: bump to version 2.7.1
078c1167 chore: bump to version 2.7.1
90959848 chore: changelog update (#3163)
9f204a18 fix: func_handle for rule of two (#3169)
ada6b791 [pre-commit.ci] pre-commit autoupdate (#3167)
a2b78a8c chore: changelog update (#3163)
c0756ccd fix: func_handle for rule of two (#3169)
f4f4632e [pre-commit.ci] pre-commit autoupdate (#3167)
dcbda8d7 Removing MSVC C4127 from pragma block at the top of pybind11.h (#3152)
b961ac64 Moving pragma for MSVC warning C4505 from pybind11.h to existing list in detail/common.h (#3160)
c80e0593 fix: Mingw64 corrected and add a CI job to test it (#3132)
46c51fc0 Limiting pragma for ignoring GCC 7 -Wnoexcept-type to the scope of pybind11.h. (#3161)
e2573dc9 Moving pragma for MSVC warning C4505 from pybind11.h to existing list in detail/common.h (#3160)
9e8a741b fix: Mingw64 corrected and add a CI job to test it (#3132)
b4259729 Limiting pragma for ignoring GCC 7 -Wnoexcept-type to the scope of pybind11.h. (#3161)
b1fdbe69 chore: add discussions link (#3159)
05852fb6 Accommodating environments that define __STDC_WANT_LIB_EXT1__ even if __STDC_LIB_EXT1__ is not defined by the implementation. (#3151)
ed5fb66b Removing __INTEL_COMPILER section from pragma block at the top of pybind11.h (#3135)
0ac4c8af maint(clang-tidy): Improve code readability with explicit boolean casts (#3148)
5c6bdb72 fix: the CMake config in Python package had a hard coded path (#3144)
fd71bd48 Allow python builtins to be used as callbacks (#1413)
e93d9459 Removing MSVC C4800 from pragma block at the top of pybind11.h (#3141)
c973660d [pre-commit.ci] pre-commit autoupdate (#3143)
85b38c69 Adding pragma warning(disable: 4522) for MSVC <= 2017. (#3142)
b193d42c Removing MSVC C4996 from pragma block at the top of pybind11.h (#3129)
ee3ecb8a Specified encoding in setup.py calls of open() (#3137)
c14b1933 chore: increase CMake upper limit (#3124)
b72ca7d1 Removing MSVC C4100 from pragma block at the top of pybind11.h (#3150)
f4721a7b Accommodating environments that define __STDC_WANT_LIB_EXT1__ even if __STDC_LIB_EXT1__ is not defined by the implementation. (#3151)
2164c2e0 Removing __INTEL_COMPILER section from pragma block at the top of pybind11.h (#3135)
9beaa925 maint(clang-tidy): Improve code readability with explicit boolean casts (#3148)
7cc0ebb4 fix: the CMake config in Python package had a hard coded path (#3144)
a0b97596 Allow python builtins to be used as callbacks (#1413)
a0f862d4 Removing MSVC C4800 from pragma block at the top of pybind11.h (#3141)
7f76d795 [pre-commit.ci] pre-commit autoupdate (#3143)
7904ba1a Adding pragma warning(disable: 4522) for MSVC <= 2017. (#3142)
ff97f101 Removing MSVC C4996 from pragma block at the top of pybind11.h (#3129)
e58c6897 Specified encoding in setup.py calls of open() (#3137)
d65edfb0 Feature/local exception translator (#2650)
6d5d4e73 Move object in pop method of List. (#3116)
9626483c [pre-commit.ci] pre-commit autoupdate (#3134)
34f587dd Removing all warning pragmas that have not effect. (#3127)
74935f8d chore: post-release (#3128)
65e95ea8 chore: bump to 2.7.0 (#3123)
6642f389 docs: update changelog (#3122)
4359e00b Introducing PYBIND11_VERSION_HEX (#3120)
1b10292c chore: support PDF from nox (#3121)
55f6f6e9 Fix: RTD Docutils Build (#3119)
2415c094 feat(package): support pipx run (#3117)
31843d45 docs: reduce visibility of 3.9.0 warning (#3105)
5cd37507 Enable -Wstrict-aliasing warning (#2816)
c4b0dc7c Add shellcheck style checking (#3114)
cd061aee style: pre-commit cleanup (#3111)
7331d381 Raise codec errors when casting to std::string (#2903)
aca6c3ba * Removing stray semicolons (discovered by running clang-format v12 followed by tools/check-style.sh). (#3087)
1be0a0a6 Add helper to build in-tree extensions. (#2831)
2b7985e5 Improve documentation of discard_as_unraisable() API (#2697)
25e470c5 fix(clang-tidy): Add cppcoreguidelines-init-vars,slicing, and throw-by-value-catch-by-reference checks (#3094)
6a644c8f docs: update changelog (#3099)
0e2e0035 style: add pyupgrade check, 2.7+
11e12fe4 chore: move some config to pyproject.toml
84fdadfb chore: update pre-commit hooks
75090647 More precise return_value_policy::automatic documentation. (#2920)
ddf0efb9 chore: add nox support (#3101)
9f11951b Fixing spelling errors that went undetected because the pre-commit spell check was added after the CI for PR #2995 last ran. (#3103)
f0a65c89 docs(fix): spelling mistake in recent commit
7472d37a Adding iostream.h thread-safety documentation. (#2995)
2d468697 NOLINT reduction (#3096)
7a64b8ad docs: fix script issues for changelog compilation (#3100)
0f4761b4 Rollback of DOWNLOAD_CATCH=OFF change merged via PR #3059. (#3092)
cf006af2 Fix typos and docs style (#3088)
bac5a0c3 Go all the way fixing clang-tidy issues to avoid the NOLINTNEXTLINE clutter and clang-format issues. This was really meant to be part of PR #3051 but was held back either out of an abundance of caution, or because of confusion caused by stray semicolons. (#3086)
b5357d1f fix(clang-tidy): Enable clang-tidy else-after-return and redundant void checks (#3080)
6d1b197b Splitting out pybind11/stl/filesystem.h. (#3077)
c090c8c4 Unify cast_error message thrown by [simple|unpacking]_collector (#3013)
0ad116d3 Adding codespell to .pre-commit-config.yaml (follow-on to PR #3075). (#3076)
8bee61b6 docs: fix various typos (#3075)
795e3c4c Removing `AlignConsecutiveAssignments: true`. (#3067)
6d440946 Check dict item accesses where it isn't already checked (#2863)
5bcaaa04 Add a std::filesystem::path <-> os.PathLike caster. (#2730)
f067deb5 avoid unnecessary strlen (#3058)
733f8de2 Avoid string copy if possible when passing a Python object to std::ostream (#3042)
cad79c11 tests: remove very minor oversight in PR #3059. (#3066)
fbae8f31 pickle setstate: setattr __dict__ only if not empty (#2972)
93e69191 fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types (#3059)
484b0f04 Updating and slightly enhancing instructions for running clang-tidy. (#3055)
dac74ebd fix(clang-tidy): performance fixes applied in tests and CI (#3051)
3b30b0a5 fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (#3052)
d00fc629 use CMAKE_INSTALL_FULL_INCLUDEDIR (#3005)
9b3b3577 chore(deps): bump ilammy/msvc-dev-cmd from 1.8.1 to 1.9.0 (#3027)
e0b5cbd4 chore(clang-tidy): add more modernize clang-tidy checks (#3049)
af6218ff fix(clang-tidy): Apply performance fixes from clang-tidy (#3046)
79178e71 fix(setup_helpers): try import multiprocessing.synchronize too (#3043)
19d99a87 Working around Centos 8 failure. (#3030)
b4b67f02 Fix typos (#3044)
cd4b49a2 Update py::kwargs examples to pass by reference (#3038)
4c7697db Add const T to docstring generation. (#3020)
e25b1505 Adjusting valgrind suppression for pypocketfft to resolve systematic failures that started to appear on 2020-05-27. (#3022)
3ac690b8 Explicitly export exception types. (#2999)
14023c9c chore(deps): bump ilammy/msvc-dev-cmd from 1.8.0 to 1.8.1 (#3021)
f61855b9 chore(deps): bump ilammy/msvc-dev-cmd from 1 to 1.8.0 (#3001)
bc7cf6ef chore(deps): bump jwlawson/actions-setup-cmake from 1.8 to 1.9 (#3000)
b6ec0e95 functions: Add doc on incorrect argument index (#2979)
417fd120 Fix: fix typo of WITHOUT_SOABI (#2992)
0c93a0f3 Fix Unicode support for ostream redirects (#2982)
54430436 ci: install Boost for boost checks (#2968)
bca4b36b chore(deps): bump pre-commit/action from v2.0.2 to v2.0.3 (#2964)
5e4804bb tests: use master commit for pytest on 3.10 (#2967)
e08a5811 Fix compilation with gcc < 5 (#2956)
114be7f4 docs: remove recommonmark (#2955)
62976cfc fix: using -Werror-all for Intel (#2948)
6709abba Allow function pointer extraction from overloaded functions (#2944)
e0c1dadb chore: add myself to CODEOWNERS (#2940)
4f0727f2 Fix the enabling of default extension handling (#2938)
16c23fef chore(deps): bump pre-commit/action from v2.0.0 to v2.0.2 (#2935)
ad6bf5cd Adding PyGILState_Check() in object_api<>::operator(). (#2919)
f676782b env: Add surrogate for pytest.deprecated_call for ptyest<3.9 (#2923)
1259db6f Fix Pybind11Extension on mingw64 (#2921)
c2db53da fix: catch missing self argument in overloads constructor (#2914)
3df0ee6f docs: typo in classes.rst (#2926)
0e01c243 Generalizing suppression for pypocketfft. (#2896)
f110889d Use correct duration representation when casting from datetime.timdelta to std::chrono::duration (#2870)
44678e54 Shuffling code in test_multiple_inheritance.cpp to separate struct/class definitions from bindings code. (#2890)
9c0aa699 Pointing out namespace in docs (#2874)
e2e819b2 Shuffling code in test_smart_ptr.cpp to separate struct/class definitions from bindings code. Back-porting from smart_holder branch, to minimize diffs and potential for merge conflicts. (#2875)
74a767d4 Dtype kind vs char  (#2864)
c0fbb02c Extract gil management functions to separate header (#2845)
0c42250a Splitting out detail/type_caster_base.h from cast.h, with iwyu cleanup. (#2841)
98f9a33c Correct typo in FAQ (#2868)
59f8d7f1 chore(deps): bump jwlawson/actions-setup-cmake from v1.7 to v1.8 (#2865)
417067ee Add pybind11::bytearray (#2799)
cbae6d55 docs: fix CMake status for DOWNLOAD_EIGEN (#2857)
c2362393 chore(deps): bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (#2851)
c78dfb69 MSVC but not Clang: /MP (#2824)
e791ec4e fix: add null pointer check with std::localtime (#2846)
948d09d6 test: Test against Python 3.10 (#2848)
fe845878 Make sure all warnings in pytest get turned into errors (#2838)
721834b4 chore: get PyPy 3.7 wheels using NumPy 1.20 (#2837)
6cf6bf20 Fix confusing weakref constructor overload (#2832)
932769b0 Adding holder_caster `typename SFINAE = void` hooks to help work around the current lack of smart-pointer interoperability (#2833)
23c3edcf When determining if a shared_ptr already exists, use a test on the we… (#2819)
0432ae7c Changing pybind11::str to exclusively hold PyUnicodeObject (#2409)
587d5f84 Update breathe to 4.26.1, add make_tuple, make_iterator, and make_key_iterator (#2828)
9b7bfef8 Factoring out find_registered_python_instance() from type_caster_generic::cast. (#2822)
87954e7a fix: corrected dev versioning
4a5b81b1 chore: get back to work

git-subtree-dir: pybind11
git-subtree-split: 015a7138e15b43e05f5ac0ff8e182a834be538e7
  • Loading branch information
hokiedsp committed Jul 5, 2024
1 parent 5ee82e2 commit 508d10c
Show file tree
Hide file tree
Showing 248 changed files with 29,215 additions and 11,360 deletions.
8 changes: 3 additions & 5 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 @@ -9,13 +9,11 @@ platform:
- x86
environment:
matrix:
- PYTHON: 36
CONFIG: Debug
- PYTHON: 27
- PYTHON: 38
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
21 changes: 19 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,36 @@
# clang-format --style=llvm --dump-config
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignConsecutiveAssignments: true
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
# SpaceInEmptyBlock: true # too new
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
...
82 changes: 73 additions & 9 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,13 +1,77 @@
FormatStyle: file

Checks: '
llvm-namespace-comment,
modernize-use-override,
readability-container-size-empty,
modernize-use-using,
modernize-use-equals-default,
modernize-use-auto,
modernize-use-emplace,
'
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'
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
9 changes: 9 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.cmake @henryiii
CMakeLists.txt @henryiii
*.yml @henryiii
*.yaml @henryiii
/tools/ @henryiii
/pybind11/ @henryiii
noxfile.py @henryiii
.clang-format @henryiii
.clang-tidy @henryiii
62 changes: 46 additions & 16 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,33 @@ derivative works thereof, in binary and source code form.

## Development of pybind11

### Quick setup

To setup a quick development environment, use [`nox`](https://nox.thea.codes).
This will allow you to do some common tasks with minimal setup effort, but will
take more time to run and be less flexible than a full development environment.
If you use [`pipx run nox`](https://pipx.pypa.io), you don't even need to
install `nox`. Examples:

```bash
# List all available sessions
nox -l

# Run linters
nox -s lint

# Run tests on Python 3.9
nox -s tests-3.9

# Build and preview docs
nox -s docs -- serve

# Build SDists and wheels
nox -s build
```

### Full setup

To setup an ideal development environment, run the following commands on a
system with CMake 3.14+:

Expand All @@ -66,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 @@ -88,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 All @@ -109,7 +135,7 @@ The valid options are:
* Use `-G` and the name of a generator to use something different. `cmake
--help` lists the generators available.
- On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give
you automatic mulithreading on all your CMake projects!
you automatic multithreading on all your CMake projects!
* Open the `CMakeLists.txt` with QtCreator to generate for that IDE.
* You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file
that some tools expect.
Expand All @@ -132,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 @@ -203,16 +230,19 @@ of the pybind11 repo.
[`clang-tidy`][clang-tidy] performs deeper static code analyses and is
more complex to run, compared to `clang-format`, but support for `clang-tidy`
is built into the pybind11 CMake configuration. To run `clang-tidy`, the
following recipe should work. Files will be modified in place, so you can
use git to monitor the changes.
following recipe should work. Run the `docker` command from the top-level
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:/pybind11 -it silkeh/clang:10
apt-get update && apt-get install python3-dev python3-pytest
cmake -S pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix"
cmake --build build
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 @@ -228,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
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

Loading

0 comments on commit 508d10c

Please sign in to comment.