From 5b818fd663cf6bc1574a56ebbdefb9bfdf75ba3d Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 22:47:44 +0100 Subject: [PATCH 01/11] Bump actions/checkout@v4 and actions/setup-python@v5 --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/tests.yml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da129836..a8af7866 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Build wheel and source tarball diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 39f5cf0c..a6fbaae9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7588a997..2acdecd8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,9 +23,9 @@ jobs: python-version: "pypy3.8" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -45,9 +45,9 @@ jobs: dependency: ["aiohttp", "requests", "httpx", "websockets"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies with only ${{ matrix.dependency }} extra dependency @@ -61,9 +61,9 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install test dependencies From 39c1f71711fbbe0012af6e4304929a335090e5e5 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 22:53:01 +0100 Subject: [PATCH 02/11] Change default Python versions for GitHub actions to 3.12 --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/tests.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a8af7866..9069c926 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Build wheel and source tarball run: | pip install wheel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a6fbaae9..7291dcce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,10 +8,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip wheel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2acdecd8..3818cc8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,10 +46,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies with only ${{ matrix.dependency }} extra dependency run: | python -m pip install --upgrade pip wheel @@ -62,10 +62,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install test dependencies run: | python -m pip install --upgrade pip wheel From 0a9c0f366b668e88f19e9d041f40686b1b2d878b Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 22:55:09 +0100 Subject: [PATCH 03/11] Bump Ubuntu version for tests from 20.04 to 24.04 --- .github/workflows/deploy.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/tests.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9069c926..1147ecf5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7291dcce..86f2468b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3818cc8f..f67264c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 4 matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"] - os: [ubuntu-20.04, windows-latest] + os: [ubuntu-24.04, windows-latest] exclude: - os: windows-latest python-version: "3.9" @@ -38,7 +38,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} single_extra: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -58,7 +58,7 @@ jobs: run: pytest tests --${{ matrix.dependency }}-only coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 From 2f8aab3216065c74714034e94af82d996d9c18d2 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:09:33 +0100 Subject: [PATCH 04/11] Bump pytest-console-scripts to 1.4.1 --- setup.py | 2 +- tests/test_aiohttp.py | 3 ++- tests/test_cli.py | 2 +- tests/test_httpx_async.py | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 7ca66ae3..3701e225 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ "parse==1.15.0", "pytest==7.4.2", "pytest-asyncio==0.21.1", - "pytest-console-scripts==1.3.1", + "pytest-console-scripts==1.4.1", "pytest-cov==5.0.0", "vcrpy==4.4.0", "aiofiles", diff --git a/tests/test_aiohttp.py b/tests/test_aiohttp.py index b16964d0..55b08260 100644 --- a/tests/test_aiohttp.py +++ b/tests/test_aiohttp.py @@ -1162,7 +1162,8 @@ def test_code(): monkeypatch.setattr("sys.stdin", io.StringIO(query1_str)) ret = script_runner.run( - "gql-cli", url, "--verbose", stdin=io.StringIO(query1_str) + ["gql-cli", url, "--verbose"], + stdin=io.StringIO(query1_str), ) assert ret.success diff --git a/tests/test_cli.py b/tests/test_cli.py index cdbe07f9..88d1f533 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -372,7 +372,7 @@ def test_cli_get_transport_no_protocol(parser): @pytest.mark.script_launch_mode("subprocess") def test_cli_ep_version(script_runner): - ret = script_runner.run("gql-cli", "--version") + ret = script_runner.run(["gql-cli", "--version"]) assert ret.success diff --git a/tests/test_httpx_async.py b/tests/test_httpx_async.py index 3665f5d8..17be0db5 100644 --- a/tests/test_httpx_async.py +++ b/tests/test_httpx_async.py @@ -1036,7 +1036,8 @@ def test_code(): monkeypatch.setattr("sys.stdin", io.StringIO(query1_str)) ret = script_runner.run( - "gql-cli", url, "--verbose", stdin=io.StringIO(query1_str) + ["gql-cli", url, "--verbose"], + stdin=io.StringIO(query1_str), ) assert ret.success From ee78a18ac94ab3c2defde13f7dff65d85eb25d30 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:13:02 +0100 Subject: [PATCH 05/11] tox.ini using python instead of python3.8 --- tox.ini | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index 7a639572..308aba00 100644 --- a/tox.ini +++ b/tox.ini @@ -32,37 +32,37 @@ commands = py{38}: pytest {posargs:tests --cov-report=term-missing --cov=gql} [testenv:black] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = black --check gql tests [testenv:flake8] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = flake8 gql tests [testenv:import-order] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = isort --recursive --check-only --diff gql tests [testenv:mypy] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = mypy gql tests [testenv:docs] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = sphinx-build -b html -nEW docs docs/_build/html [testenv:manifest] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = check-manifest -v From 5d0ed6284e6ed08935fb412a72d5ea1249f974e9 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:21:24 +0100 Subject: [PATCH 06/11] Bump flake8 to 7.1.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3701e225..132f6ead 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ dev_requires = [ "black==22.3.0", "check-manifest>=0.42,<1", - "flake8==3.8.1", + "flake8==7.1.1", "isort==4.3.21", "mypy==1.10", "sphinx>=5.3.0,<6", From db0a35deb05026b7a6f5ad365045460e84014310 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:30:34 +0100 Subject: [PATCH 07/11] Using pypy3.12 instead of pypy3.8 for GitHub actions --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f67264c1..88b8e6b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.12"] os: [ubuntu-24.04, windows-latest] exclude: - os: windows-latest @@ -20,7 +20,7 @@ jobs: - os: windows-latest python-version: "3.12" - os: windows-latest - python-version: "pypy3.8" + python-version: "pypy3.12" steps: - uses: actions/checkout@v4 From 9f9048658cdb895404cd902c0b410ab33095e32c Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:37:06 +0100 Subject: [PATCH 08/11] Using pypy3.10 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 88b8e6b0..883e2f84 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"] os: [ubuntu-24.04, windows-latest] exclude: - os: windows-latest @@ -20,7 +20,7 @@ jobs: - os: windows-latest python-version: "3.12" - os: windows-latest - python-version: "pypy3.12" + python-version: "pypy3.10" steps: - uses: actions/checkout@v4 From a6358c93c04d720337d2730bd5917f8db285cae9 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Mon, 28 Oct 2024 23:54:52 +0100 Subject: [PATCH 09/11] Bump codecov-action to v3 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 883e2f84..e3f787e9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,4 +73,4 @@ jobs: - name: Test with coverage run: pytest --cov=gql --cov-report=xml --cov-report=term-missing tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 From 2cfb547d274e3e74cc004e327f74859fc0c74318 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Tue, 29 Oct 2024 00:04:12 +0100 Subject: [PATCH 10/11] Bump codecov-action to v4 with a secret token --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3f787e9..1cb1b8ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,4 +73,7 @@ jobs: - name: Test with coverage run: pytest --cov=gql --cov-report=xml --cov-report=term-missing tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} From 0628c1b0cb501a0e142902228695a82d21fa8272 Mon Sep 17 00:00:00 2001 From: Leszek Hanusz Date: Tue, 29 Oct 2024 00:07:09 +0100 Subject: [PATCH 11/11] Fix indentation --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1cb1b8ba..f67d0b6f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,6 +74,6 @@ jobs: run: pytest --cov=gql --cov-report=xml --cov-report=term-missing tests - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} + with: + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }}