From 106ffefa7114c4758e55316749f6ea31f1b81b8c Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 25 Oct 2024 04:44:37 +0200 Subject: [PATCH 1/4] Allow manual triggers --- .github/workflows/ci_master.yaml | 1 + .github/workflows/ci_pr.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci_master.yaml b/.github/workflows/ci_master.yaml index b871ca1..eb5ea7f 100644 --- a/.github/workflows/ci_master.yaml +++ b/.github/workflows/ci_master.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: jobs: ci: diff --git a/.github/workflows/ci_pr.yaml b/.github/workflows/ci_pr.yaml index 5219862..d07e80b 100644 --- a/.github/workflows/ci_pr.yaml +++ b/.github/workflows/ci_pr.yaml @@ -2,6 +2,7 @@ name: CI Pull Request on: pull_request: + workflow_dispatch: jobs: ci: From a6ed6fd3b1650e9a16e6603ecd5c2f1358fb0328 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 25 Oct 2024 04:52:21 +0200 Subject: [PATCH 2/4] Skip test_optional_and_union_none_does_not_pollute_scope_via_caching() on Python < 3.10 --- tests/test_types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_types.py b/tests/test_types.py index 485b2e1..e34de11 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -1,4 +1,5 @@ from dataclasses import InitVar +from sys import version_info from typing import Optional, Union, List, Any, Dict, NewType, TypeVar, Generic, Collection, Tuple, Type from unittest.mock import patch, Mock @@ -401,6 +402,7 @@ class FakeType: assert extract_generic(FakeType, defaults) == defaults +@pytest.mark.skipif(version_info < (3, 10), reason="requires python3.10") def test_optional_and_union_none_does_not_pollute_scope_via_caching(): is_generic(Optional[str]) is_generic_collection(str | None) From 06e65920203738442c7c9c89ad63c5e4159d0874 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 25 Oct 2024 05:01:40 +0200 Subject: [PATCH 3/4] improve reason --- tests/test_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_types.py b/tests/test_types.py index e34de11..c6b5664 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -402,7 +402,7 @@ class FakeType: assert extract_generic(FakeType, defaults) == defaults -@pytest.mark.skipif(version_info < (3, 10), reason="requires python3.10") +@pytest.mark.skipif(version_info < (3, 10), reason="writing union types as X | Y requires Python 3.10") def test_optional_and_union_none_does_not_pollute_scope_via_caching(): is_generic(Optional[str]) is_generic_collection(str | None) From 53270e31c86bbb2217d2aff2c63b18d54de510bf Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Fri, 25 Oct 2024 05:06:17 +0200 Subject: [PATCH 4/4] use native github token --- .github/workflows/code_check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_check.yaml b/.github/workflows/code_check.yaml index b85a786..3920d38 100644 --- a/.github/workflows/code_check.yaml +++ b/.github/workflows/code_check.yaml @@ -44,7 +44,7 @@ jobs: tool: 'pytest' output-file-path: benchmark.json save-data-file: ${{ inputs.store_benchmark }} - github-token: ${{ secrets.benchmark_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} auto-push: ${{ inputs.publish_performance }} benchmark-data-dir-path: performance/${{ matrix.python-version }} comment-always: false