Commit Graph

3216 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve
bb68819cdf Tracking ci.yml changes from master. 2023-02-16 15:03:38 -08:00
Ralf W. Grosse-Kunstleve
550d4b7490 Merge branch 'master' into sh_merge_master 2023-02-16 15:02:47 -08:00
Ralf W. Grosse-Kunstleve
f7587abb94 Revert "Temporarily remove pip.yml, to avoid GHA failures while waiting for a fix on master."
This reverts commit 3cef809281.
2023-02-16 15:01:45 -08:00
Ralf W. Grosse-Kunstleve
08a4a47a6c
Revert "Go back to CMake 3.25.2 (#4496)" (#4503)
* Revert "Go back to CMake 3.25.2 (#4496)"

This reverts commit b8f28551cc.

* Apply patch provided by @bradking (with pre-commit cmake-format auto fixes).

https://github.com/pybind/pybind11/pull/4503#issuecomment-1424768172
2023-02-16 10:54:57 -05:00
Henry Schreiner
535f81a1c0
fix: tests dir has started to show up in packaging (#4510)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-02-16 09:54:27 -05:00
Dustin Spicuzza
8dcced29ae
Always display python type information in cast errors (#4463)
* Always display python type information in cast errors

* Address comments

* Update comment
2023-02-09 21:21:17 -08:00
Mike Essenmacher
531144dddc
Replace "whitelist" with "allowlist" (#4506) 2023-02-09 10:11:01 -08:00
Ralf W. Grosse-Kunstleve
3cef809281 Temporarily remove pip.yml, to avoid GHA failures while waiting for a fix on master. 2023-02-07 23:56:34 -08:00
Ralf W. Grosse-Kunstleve
3d8e525766 Tracking ci.yml changes from master. 2023-02-07 23:55:18 -08:00
Ralf W. Grosse-Kunstleve
8c43d35210 Merge branch 'master' into sh_merge_master3 2023-02-07 23:54:04 -08:00
Ralf W. Grosse-Kunstleve
b8f28551cc
Go back to CMake 3.25.2 (#4496) 2023-02-07 20:19:33 -08:00
Ralf W. Grosse-Kunstleve
f8713ec43e
Revert "bugfix: Keep registered types until after Py_Finalize(). Fix #4459 (#4486)" (#4501)
This reverts commit b2c1978caa.

See #4500 for background.
2023-02-07 16:55:00 -08:00
pre-commit-ci[bot]
8a90b36772
chore(deps): update pre-commit hooks (#4495)
updates:
- [github.com/PyCQA/pylint: v2.16.0 → v2.16.1](https://github.com/PyCQA/pylint/compare/v2.16.0...v2.16.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-07 01:16:25 -05:00
Aaron Gokaslan
b2c1978caa
bugfix: Keep registered types until after Py_Finalize(). Fix #4459 (#4486)
* Keep registered types until after Py_Finalize(). Fix #4459

* Address reviewer comments
2023-02-06 11:36:05 -05:00
dependabot[bot]
9ef65cee0e
chore(deps): bump ilammy/msvc-dev-cmd from 1.12.0 to 1.12.1 (#4493)
Bumps [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/ilammy/msvc-dev-cmd/releases)
- [Commits](https://github.com/ilammy/msvc-dev-cmd/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: ilammy/msvc-dev-cmd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 00:16:52 -05:00
Aaron Gokaslan
08a89fac3a
bugfix: delete proper ctors in gil.h (#4490) 2023-02-04 13:40:13 -05:00
Henry Schreiner
3efe9d4cb5
chore: update to black 23 (#4482)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-02-01 14:23:37 -05:00
Daniel Jacobs
44e9368222
Use PyConfig_InitPythonConfig instead of PyConfig_InitIsolatedConfig (#4473)
* Use PyConfig_InitPythonConfig instead of PyConfig_InitIsolatedConfig

* add unit test for default python configuration

---------

Co-authored-by: Daniel Jacobs <daniel.jacobs@is4s.com>
2023-01-31 23:42:05 -08:00
Ralf W. Grosse-Kunstleve
c71e3af73f
Bump isort version to 5.12.0 (#4480) 2023-01-31 22:44:18 -08:00
Ralf W. Grosse-Kunstleve
a500f439d0
Resolve new flake8 error (#4462)
* Resolve flake8 error by replacing `pytest.raises(Exception)` with `SystemError`

* Also remove the obsolete comment.

* Tweak comment instead of removing it.
2023-01-19 10:48:46 -08:00
albanD
c709d2a83e
Make sure to properly untrack gc objects before freeing them (#4461)
* Make sure to properly untrack gc objects before freeing them

* style: pre-commit fixes

* Fix lint

* Add comment about where the original track comes from

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-18 12:11:26 -08:00
Ralf W. Grosse-Kunstleve
e53d58af6c
Ensure import pybind11_tests traceback is shown. (#4455) 2023-01-14 16:47:56 -05:00
Ralf W. Grosse-Kunstleve
d821788bb6
Add clang15 C++20 job (#4443) 2023-01-12 17:50:28 -08:00
Ralf W. Grosse-Kunstleve
8ece7d641c Resolve new clang-tidy error (after upgrade to clang15 with PR #4387) 2023-01-03 20:42:38 -08:00
Ralf W. Grosse-Kunstleve
94eb9ce370 Tracking ci.yml changes from master. 2023-01-03 19:41:02 -08:00
Ralf W. Grosse-Kunstleve
44d158ca50 Merge branch 'master' into sh_merge_master 2023-01-03 19:40:01 -08:00
Henry Schreiner
a34596bfe1
chore: back to work
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-03 14:23:36 -05:00
Henry Schreiner
b2d7ad72c2
chore: prepare for 2.10.3 (#4437)
* docs: update changelog for v2.10.3

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: bump versions for 2.10.3

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* chore: fix make changelog script with entry is empty

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-01-03 11:34:22 -05:00
pre-commit-ci[bot]
769fd3b889
chore(deps): update pre-commit hooks (#4439)
updates:
- [github.com/asottile/pyupgrade: v3.3.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.3.0...v3.3.1)
- [github.com/PyCQA/isort: 5.10.1 → 5.11.4](https://github.com/PyCQA/isort/compare/5.10.1...5.11.4)
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
- [github.com/PyCQA/pylint: v2.15.8 → v2.15.9](https://github.com/PyCQA/pylint/compare/v2.15.8...v2.15.9)
- [github.com/shellcheck-py/shellcheck-py: v0.8.0.4 → v0.9.0.2](https://github.com/shellcheck-py/shellcheck-py/compare/v0.8.0.4...v0.9.0.2)
- [github.com/pre-commit/mirrors-clang-format: v15.0.4 → v15.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v15.0.4...v15.0.6)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-03 10:21:05 -05:00
cyy
e3e24f3f65
fix: issuses detected by static analyzer (#4440)
* fix incorrect variable check

* remove duplicated check

* remove unneeded const cast
2023-01-03 10:20:39 -05:00
Ralf W. Grosse-Kunstleve
6da268a5c5
ci: remove clang 10 C++20 (it broke recently) (#4438)
* Remove clang 10 C++20 (it broke recently), add clang 15 C++20 while we are at it.

* No luck trying clang15: Error response from daemon: manifest for silkeh/clang:15 not found: manifest unknown: manifest unknown. Giving up, this needs to be a separate PR.
2023-01-03 08:46:55 -05:00
Ralf W. Grosse-Kunstleve
f12e098f1d
Fix detail::obj_class_name() to work correctly for meta classes. (#4436)
* Fix `detail::obj_class_name()` to work correctly for meta classes.

* Adjust expected name for PyPy
2023-01-02 03:46:17 -08:00
Ethan Steinberg
60f02f5f66
fix: improve the error reporting for inc_ref GIL failures (#4427)
* First

* Fixs

* Improve

* Additional assertions comment

* Improve docs
2022-12-30 13:46:55 -05:00
kajananchinniah
70af9873c2
docs: fixed typo in spelling of first (#4428) 2022-12-28 12:49:57 -05:00
Aaron Gokaslan
7f23e9f3a4
chore: update clang-tidy to 15 (#4387)
* chore: update clang-tidy to 15

* Add git

* Add NOLINTNEXTLINE for assignment in if

* Update CONTRIBUTING.md

* Add NOLINTNEXTLINE where needed

* Add one more NOLINTNEXTLINE

* stl_bind: make more readable

* Another missing NOLINTNEXTLINE

* Match style elsewhere

* Apply reviewer suggestion. Mark false positive
2022-12-27 15:14:10 -05:00
Ralf W. Grosse-Kunstleve
a6b19133b6 Tracking ci.yml changes from master. 2022-12-20 23:52:47 -08:00
Ralf W. Grosse-Kunstleve
81f5831b35 Merge branch 'master' into sh_merge_master 2022-12-20 23:43:34 -08:00
Henry Schreiner
0694ec6a15
chore: preapre for 2.10.2 release (#4414)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-12-20 17:57:47 -05:00
Henry Schreiner
3fd1520de2
docs: changelog for next version (#4413)
* docs: changelog for next version

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* docs: address feedback

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-12-20 14:47:41 -05:00
Ethan Steinberg
ee4b9f5d7b
Fix ODR violations in our Eigen Tensor tests (#4412)
* First

* Fix centos 7 again :(

* Fix minor nits
2022-12-20 05:34:00 -08:00
Henry Schreiner
a97c4d220e
fix(cmake): support Windows ARM cross-compilation (#4406)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-12-19 14:36:39 -05:00
Martin Blanchard
09db6445d8
IPO/LTO support for ICX (IntelLLVM) compiler (#4402)
* IPO/LTO support for ICX (IntelLLVM) compiler

https://github.com/pybind/pybind11/issues/4080

* style: pre-commit fixes

* Add WARNING/HELP WANTED comment.

Co-authored-by: Martin Blanchard <martin.blanchard@siemens.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
2022-12-15 21:10:46 -08:00
Ralf W. Grosse-Kunstleve
ece1206b8a
ci: set env: VERBOSE: 1 (#4405)
* Revert "Systematically add `-DCMAKE_VERBOSE_MAKEFILE=ON` to obtain full command lines related to `-Wodr` (#4398)"

This reverts commit ff42f5254a.

* Set `env: VERBOSE: 1` as suggested by @henryiii

* Set `env: VERBOSE: 1` also in all other .yml files using cmake
2022-12-15 16:19:13 -05:00
Martin Blanchard
89c3561d9a
Fix multi-context new Python linking mode (#4401)
Allow CMake find_package() from multiple directories.

https://github.com/pybind/pybind11/issues/4400

Co-authored-by: Martin Blanchard <martin.blanchard@siemens.com>
2022-12-14 14:03:37 -05:00
Ralf W. Grosse-Kunstleve
2120dde73e Tracking ci.yml changes from master. 2022-12-13 11:08:40 -08:00
Ralf W. Grosse-Kunstleve
27eeb275e9 Merge branch 'master' into sh_merge_master 2022-12-13 11:06:14 -08:00
Ralf W. Grosse-Kunstleve
ff42f5254a
Systematically add -DCMAKE_VERBOSE_MAKEFILE=ON to obtain full command lines related to -Wodr (#4398) 2022-12-13 11:04:05 -08:00
Ralf W. Grosse-Kunstleve
ee10afa1da Merge branch 'master' into smart_holder 2022-12-12 19:57:13 -08:00
Ralf W. Grosse-Kunstleve
4766065e5c
[smart_holder] test_class_sh_mi_thunks (started from PR #4374) (#4380)
* Content of PR #4374 applied on top of smart_holder branch.

* More tests, with USE_SH switch. [ci skip]

* Use `std::dynamic_pointer_cast<Base0>` [ci skip]

* All tests pass when using `m.make_derived_as_base0_raw_ptr()`, with `USE_SH` defined or not defined. [ci skip]

* WIP

* Debug LOOOK & one-line bug fix:

```diff
-        auto smhldr = pybindit::memory::smart_holder::from_shared_ptr(src);
+        auto smhldr = pybindit::memory::smart_holder::from_shared_ptr(std::shared_ptr<void>(src, const_cast<void *>(st.first)));
```

* Remove all print LOOOK and clang-format the fix.

* Resolve clang-tidy errors.

* Systematic test matrix.

* Bug fix in `smart_holder_type_caster<std::unique_ptr<T, D>>::cast()`

* Rename: test_mi_debug -> test_class_sh_mi_thunks

* Add `test_ptrdiff_derived_base0()`

* Miscellaneous polishing (naming, comments). No functional changes.

* Improve test_class_sh_mi_thunks.py implementation. No change in test coverage.

* Resolve clang-tidy error.
2022-12-12 19:55:16 -08:00
Henry Schreiner
9727dcdae5
chore: future safe bugbear opinionated warnings (#4393)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-12-09 23:18:36 -05:00