Commit Graph

401 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve
21d81fc21d
[smart_holder] Fix terrible merge accident: PYBIND11_INTERNALS_SH_DEF missing in PYBIND11_INTERNALS_ID and PYBIND11_MODULE_LOCAL_ID (#5159)
* Fix oversight: Add `-DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"` for new `manylinux` job (Manylinux on 🐍 3.13t • GIL).

* Fix terrible merge accident introduced with pybind/pybind11#5085: `PYBIND11_INTERNALS_SH_DEF` was accidentally removed from `PYBIND11_INTERNALS_ID` and `PYBIND11_MODULE_LOCAL_ID`.
2024-06-10 18:20:40 -07:00
Ralf W. Grosse-Kunstleve
540c760363 Tracking ci.yml changes from master. 2024-06-09 23:56:33 -07:00
Ralf W. Grosse-Kunstleve
6b3b69777e Merge branch 'master' into sh_merge_master 2024-06-09 23:55:50 -07:00
Henry Schreiner
1a0ff40549
tests: avoid immortal objects in tests (#5150)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-05-30 01:40:55 -04:00
Henry Schreiner
ae6432b817
fix: Python 3.13t with GIL (#5139)
* ci: try Python 3.13t

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

* fix: support Python 3.13t

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

* fix: patch PyPy

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

* tests: one more int cast

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

* tests: cleanup

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

* refactor: use named constant in tests for immortal refcounts

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

* docs: move comment about free threaded Python

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

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-05-28 09:07:59 -04:00
Ralf W. Grosse-Kunstleve
f4bc71f981 Tracking ci.yml changes from master. 2024-05-26 21:14:56 -07:00
Ralf W. Grosse-Kunstleve
92abccdd49 Merge branch 'master' into sh_merge_master 2024-05-26 21:14:20 -07:00
Henry Schreiner
4d0fcedc26
fix: support Python 3.13.0b1 (PEP 667 fix) (#5127)
* ci: add Python 3.13

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

* tests: run the gc for 3.13+

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

* Revert "tests: run the gc for 3.13+"

This reverts commit fe8a3ce3d1.

* ci: drop macos ARM for now, need pin updates

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

* fix: use Python 3.13 API if on 3.13

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

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-05-24 11:00:30 -04:00
dependabot[bot]
ede061ca0c
chore(deps): bump the actions group with 1 update (#5082)
* chore(deps): bump the actions group with 1 update

Bumps the actions group with 1 update: [actions/labeler](https://github.com/actions/labeler).


Updates `actions/labeler` from 4 to 5
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: fix labeler

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

* ci: move eigen to 64-bit only

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-05-10 16:34:41 -04:00
Henry Schreiner
f39847947d
ci: macos-latest is changing to macos-14 ARM runners (#5109)
Committed via https://github.com/asottile/all-repos
2024-05-06 12:11:41 -04:00
Ralf W. Grosse-Kunstleve
c55ee33c3e Merge branch 'master' into sh_merge_master 2024-03-27 17:12:50 -07:00
Henry Schreiner
7f2214bc68
chore: bump cmake to 3.29 (#5075)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-03-27 20:11:13 -04:00
Ralf W. Grosse-Kunstleve
e215dedd70 Tracking ci.yml changes from master. 2024-03-27 17:07:52 -07:00
Ralf W. Grosse-Kunstleve
826f615365 Merge branch 'master' into sh_merge_master 2024-03-27 17:06:50 -07:00
Henry Schreiner
3e9dfa2866
docs: a few missed changes for 2.12 (#5074) 2024-03-27 19:24:54 -04:00
Ralf W. Grosse-Kunstleve
0efff79f01
Bug fixes: Add missing handle_type_name specializations. (#5073)
* Transfer bug fixes from #4888 wholesale. Full test coverage for all fixes is still missing.

* Add cmake option(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) and use in some tests.
2024-03-27 12:39:05 -07:00
Sebastian Berg
705efccecd
feat: make numpy.h compatible with both NumPy 1.x and 2.x (#5050)
* API: Make `numpy.h` compatible with both NumPy 1.x and 2.x

* TST: Update numpy dtype flags test to not covert flags to char

* API: Add `numpy2.h` instead and make `numpy.h` safe

This means that users of `numpy.h` cannot be broken, but need to
update to `numpy2.h` if they want to compile for NumPy 2.

Using Macros simply and didn't bother to try to remove unnecessary
code paths.

* API: Rather than `numpy2.h` use a define for the user.

* Thread `PYBIND11_NUMPY2_SUPPORT` through things and try to adept test matrix

* Small fixups (shouldn't matter)?

* Fixup.  Does upgrading scipy help?  (it shouldn't?)

(Some other small fixup)

* Use NumPy 2 nightlies for ubuntu-latest job also

* BUG: Fix numpy.bool check

* TST: Fix complexwarning

* BUG: Fix the fact that only the 50 slot is filled with the copy alias

(There were 3 functions all doing the same, only this slot survived 2.x)

* TST: One more test tweak

* TST: Use "long" name for long, since it changed on windows

* TST: Apparently we didn't always have ulong, so just use `L`

* TST: Enforce dtype='l' for test as default isn't long anymore on windows

* Rename macro and invert logic to PYBIND11_NUMPY_1_ONLY

* PYBIND11_INTERNAL_NUMPY_1_ONLY_DETECTED

* Test and code comment expansion

* CI: Use pre-releases of numpy/scipy from pip via explicit version

* CI: NumPy 2 only available on almalinux (as it is Python >=3.9)

* MAINT: Match name more exactly and adopt error phrasing

* MAINT: Pushed early, move helper to be private member

* fix error message compilation when using NumPy 1.x-only backcompat

* silence name shadowing warning

* chore: minor optimization

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

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-03-26 18:20:11 -04:00
Ralf W. Grosse-Kunstleve
10283c2ef4 Tracking ci.yml changes from master. 2024-02-20 12:29:51 -08:00
Ralf W. Grosse-Kunstleve
47422c53d0 Merge branch 'master' into sh_merge_master 2024-02-20 12:29:08 -08:00
dependabot[bot]
8b48ff878c
chore(deps): bump the actions group with 3 updates (#5024)
Bumps the actions group with 3 updates: [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake), [actions/cache](https://github.com/actions/cache) and [pre-commit/action](https://github.com/pre-commit/action).


Updates `jwlawson/actions-setup-cmake` from 1.14 to 2.0
- [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases)
- [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/v1.14...v2.0)

Updates `actions/cache` from 3 to 4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

Updates `pre-commit/action` from 3.0.0 to 3.0.1
- [Release notes](https://github.com/pre-commit/action/releases)
- [Commits](https://github.com/pre-commit/action/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: jwlawson/actions-setup-cmake
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: pre-commit/action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-13 20:50:51 -05:00
Henry Schreiner
0518bf9f9a
ci: ignore actions/checkout until v5 comes out 2024-02-13 18:36:39 -05:00
Henry Schreiner
e84d446d8e
ci: Ignore v1 updates for checkout (#5023)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-02-13 18:29:42 -05:00
Ralf W. Grosse-Kunstleve
b8cf16143e Tracking ci.yml changes from master. 2024-01-16 21:11:06 -08:00
Ralf W. Grosse-Kunstleve
37c617c7fa Merge branch 'master' into sh_merge_master 2024-01-16 21:10:28 -08:00
Ralf W. Grosse-Kunstleve
869cc1ff08
install mingw-w64-${{matrix.env}}-python-scipy only for mingw64 (#5006) 2024-01-16 21:09:20 -08:00
Henry Schreiner
39e65e10d0
ci: group dependabot updates (#4986) 2024-01-13 15:28:39 -05:00
dependabot[bot]
b583336cf7
chore(deps): bump ilammy/msvc-dev-cmd from 1.12.1 to 1.13.0 (#4995)
Bumps [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd) from 1.12.1 to 1.13.0.
- [Release notes](https://github.com/ilammy/msvc-dev-cmd/releases)
- [Commits](https://github.com/ilammy/msvc-dev-cmd/compare/v1.12.1...v1.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 18:51:02 -08:00
Ralf W. Grosse-Kunstleve
feed8b15b5 Tracking ci.yml changes from master. 2023-12-14 23:58:56 -08:00
Ralf W. Grosse-Kunstleve
0103ed11e8 Merge branch 'master' into sh_merge_master 2023-12-14 23:14:57 -08:00
dependabot[bot]
eeac2f4572
chore(deps): bump actions/upload-artifact from 3 to 4 (#4975)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 18:50:09 -08:00
dependabot[bot]
e8a43ea974
chore(deps): bump actions/download-artifact from 3 to 4 (#4976)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 18:46:13 -08:00
Victor Stinner
dc477fac0e
fix: Use PyObject_VisitManagedDict() of Python 3.13 (#4973)
* fix: Use PyObject_VisitManagedDict() of Python 3.13

Use PyObject_VisitManagedDict() and PyObject_ClearManagedDict() in
pybind11_traverse() and pybind11_clear() on Python 3.13 and newer.

* Add Python 3.13 CI

* tests: don't get numpy/scipy on 3.13 yet

* ci: move 3.13 to upstream

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

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2023-12-14 18:42:55 -08:00
Pol Mesalles
daea1130b4
fix(cmake): upgrade maximum supported CMake version to 3.27 (#4786)
* Upgrade maximum supported CMake version to 3.27 to fix warning with CMP0148 policy (#4785)

* Update `macos_brew_install_llvm` pipeline to use expected Python installation

* Fix `Python_EXECUTABLE` Cmake variable typo

* Apply suggestions from code review

* fix: use FindPython for CMake 3.18+ by default for pybind11's tests

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

* tests: fix issues with finding Python

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

* tests: also set executable on subdir tests

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

* fix(cmake): correct logic for FindPython

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

* Update ci.yml

* Revert "Update ci.yml"

This reverts commit 33798adf3f.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2023-12-14 14:36:45 -05:00
dependabot[bot]
68322895df
chore(deps): bump actions/setup-python from 4 to 5 (#4965)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 21:09:08 -08:00
Ralf W. Grosse-Kunstleve
d373f1641e Tracking ci.yml changes from master. 2023-12-01 22:00:51 -08:00
Ralf W. Grosse-Kunstleve
686783b3da Merge branch 'master' into sh_merge_master 2023-12-01 21:59:50 -08:00
dependabot[bot]
4bb6163b4f
chore(deps): bump deadsnakes/action from 3.0.1 to 3.1.0 (#4951)
Bumps [deadsnakes/action](https://github.com/deadsnakes/action) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/deadsnakes/action/releases)
- [Commits](https://github.com/deadsnakes/action/compare/v3.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: deadsnakes/action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 15:37:43 -08:00
Ralf W. Grosse-Kunstleve
4c5b88a557 Tracking ci.yml changes from master. 2023-10-20 00:00:54 -07:00
Ralf W. Grosse-Kunstleve
b272af80a5 Merge branch 'master' into sh_merge_master 2023-10-20 00:00:26 -07:00
Ralf W. Grosse-Kunstleve
7969049de4
Comment out failing job, with link to #4889 (#4890) 2023-10-19 23:12:37 -07:00
Ralf W. Grosse-Kunstleve
901586943f Tracking ci.yml changes from master. 2023-10-11 21:10:22 -07:00
Ralf W. Grosse-Kunstleve
2c88356284 Merge branch 'master' into sh_merge_master 2023-10-11 21:07:36 -07:00
dependabot[bot]
6c77208561
chore(deps): bump seanmiddleditch/gha-setup-ninja from 3 to 4 (#4875)
Bumps [seanmiddleditch/gha-setup-ninja](https://github.com/seanmiddleditch/gha-setup-ninja) from 3 to 4.
- [Release notes](https://github.com/seanmiddleditch/gha-setup-ninja/releases)
- [Commits](https://github.com/seanmiddleditch/gha-setup-ninja/compare/v3...v4)

---
updated-dependencies:
- dependency-name: seanmiddleditch/gha-setup-ninja
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 21:21:22 -07:00
Ralf W. Grosse-Kunstleve
7953d19a7c Merge branch 'master' into sh_merge_master 2023-10-03 22:45:09 -07:00
pre-commit-ci[bot]
2b2e4ca4a3
chore(deps): update pre-commit hooks (#4868)
* chore(deps): update pre-commit hooks

updates:
- [github.com/psf/black-pre-commit-mirror: 23.7.0 → 23.9.1](https://github.com/psf/black-pre-commit-mirror/compare/23.7.0...23.9.1)
- [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.292](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.287...v0.0.292)
- [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.5...v2.2.6)
- [github.com/shellcheck-py/shellcheck-py: v0.9.0.5 → v0.9.0.6](https://github.com/shellcheck-py/shellcheck-py/compare/v0.9.0.5...v0.9.0.6)
- [github.com/PyCQA/pylint: v3.0.0a7 → v3.0.0](https://github.com/PyCQA/pylint/compare/v3.0.0a7...v3.0.0)

* Update .pre-commit-config.yaml

* style: pre-commit fixes

* Update .pre-commit-config.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2023-10-03 13:13:44 -04:00
Ralf W. Grosse-Kunstleve
9110b7665e Tracking ci.yml changes from master. 2023-09-10 10:50:36 -07:00
Ralf W. Grosse-Kunstleve
35b26794ec Merge branch 'master' into sh_merge_master 2023-09-10 10:49:38 -07:00
dependabot[bot]
4a2f7e4681
chore(deps): bump actions/checkout from 1 to 4 (#4836)
* chore(deps): bump actions/checkout from 1 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 1 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v1...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .github/workflows/ci.yml

* actions/checkout@v1 for centos:7

* Fix oversight: centos:7 actually works with actions/checkout@v3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
2023-09-06 15:57:18 -04:00
Ralf W. Grosse-Kunstleve
b9e956b002 Tracking ci.yml changes from master. 2023-08-07 21:03:46 -07:00
Ralf W. Grosse-Kunstleve
6f702e7f0e Merge branch 'master' into smart_holder 2023-08-07 20:59:51 -07:00