From e8f595bb85b95317ce4d1dbb3d04951d3f56e89a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 23:35:03 -0400 Subject: [PATCH 1/2] chore(deps): bump actions/attest-build-provenance in the actions group (#5335) Bumps the actions group with 1 update: [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance). Updates `actions/attest-build-provenance` from 1.4.1 to 1.4.2 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/310b0a4a3b0b78ef57ecda988ee04b132db73ef8...6149ea5740be74af77f260b9db67e633f6b0a9a1) --- updated-dependencies: - dependency-name: actions/attest-build-provenance dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index 3edfa612d..af3971663 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -102,7 +102,7 @@ jobs: - uses: actions/download-artifact@v4 - name: Generate artifact attestation for sdist and wheel - uses: actions/attest-build-provenance@310b0a4a3b0b78ef57ecda988ee04b132db73ef8 # v1.4.1 + uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2 with: subject-path: "*/pybind11*" From 3fb16ad17587a7ad7fbe18c043e790d68ee7fab4 Mon Sep 17 00:00:00 2001 From: ObeliskGate <96614155+ObeliskGate@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:36:03 +0800 Subject: [PATCH 2/2] fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330) * fix: use `__cpp_nontype_template_args` instead of gnu extensions * fix: add feature test value * fix: change `PYBIND11_TYPING_H_HAS_STRING_LITERAL` skip reason --- include/pybind11/typing.h | 4 +--- tests/test_pytypes.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/pybind11/typing.h b/include/pybind11/typing.h index b0feb9464..84aaf9f70 100644 --- a/include/pybind11/typing.h +++ b/include/pybind11/typing.h @@ -100,9 +100,7 @@ class Never : public none { using none::none; }; -#if defined(__cpp_nontype_template_parameter_class) \ - && (/* See #5201 */ !defined(__GNUC__) \ - || (__GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 3))) +#if defined(__cpp_nontype_template_args) && __cpp_nontype_template_args >= 201911L # define PYBIND11_TYPING_H_HAS_STRING_LITERAL template struct StringLiteral { diff --git a/tests/test_pytypes.py b/tests/test_pytypes.py index 1c6335f75..6f015eec8 100644 --- a/tests/test_pytypes.py +++ b/tests/test_pytypes.py @@ -1026,7 +1026,7 @@ def test_optional_object_annotations(doc): @pytest.mark.skipif( not m.defined_PYBIND11_TYPING_H_HAS_STRING_LITERAL, - reason="C++20 feature not available.", + reason="C++20 non-type template args feature not available.", ) def test_literal(doc): assert ( @@ -1037,7 +1037,7 @@ def test_literal(doc): @pytest.mark.skipif( not m.defined_PYBIND11_TYPING_H_HAS_STRING_LITERAL, - reason="C++20 feature not available.", + reason="C++20 non-type template args feature not available.", ) def test_typevar(doc): assert (