From 72b334767147dfecf5302b10025f992f1bd26d75 Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Tue, 14 Nov 2023 17:58:05 +0100 Subject: [PATCH] remove pypy3.10-7.3.13 workaround and pin CI to 7.3.12 --- .github/workflows/ci.yml | 9 +++++---- test/integration/helpers.py | 12 ------------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48376151a..d4cc5c484 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,12 +81,13 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10"] + # pypy version pin was required due 7.3.13 being broken https://foss.heptapod.net/pypy/pypy/-/issues/4021 + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10-v7.3.12"] exclude: - os: "macos-latest" - python-version: "pypy-3.10" + python-version: "pypy-3.10-v7.3.12" - os: "windows-latest" - python-version: "pypy-3.10" + python-version: "pypy-3.10-v7.3.12" steps: - uses: actions/checkout@v3 with: @@ -103,7 +104,7 @@ jobs: run: nox -vs integration -- -m "not require_secrets" - name: Run integration tests (with secrets) # Limit CI workload by running integration tests with secrets only on edge Python versions. - if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.7", "pypy-3.10", "3.11"]'), matrix.python-version) }} + if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.7", "pypy-3.10-v7.3.12", "3.11"]'), matrix.python-version) }} run: nox -vs integration -- -m "require_secrets" --cleanup test-docker: needs: cleanup_buckets diff --git a/test/integration/helpers.py b/test/integration/helpers.py index bad6dfa78..7eb867a3e 100755 --- a/test/integration/helpers.py +++ b/test/integration/helpers.py @@ -397,12 +397,6 @@ def should_succeed( assert any(p.match(line) for p in self.EXPECTED_STDERR_PATTERNS), \ f'Unexpected stderr line: {repr(line)}' - if platform.python_implementation().lower() == 'pypy': - # TODO: remove after pypy removes the leftover print and resolve - # https://github.com/Backblaze/B2_Command_Line_Tool/issues/936 - while stdout.startswith('/'): - stdout = stdout.split('\n', 1)[-1] - if expected_pattern is not None: assert re.search(expected_pattern, stdout), \ f'did not match pattern="{expected_pattern}", stdout="{stdout}"' @@ -503,12 +497,6 @@ def should_fail(self, args, expected_pattern, additional_env: Optional[dict] = N status, stdout, stderr = self.execute(args, additional_env) assert status != 0, 'ERROR: should have failed' - if platform.python_implementation().lower() == 'pypy': - # TODO: remove after pypy removes the leftover print and resolve - # https://github.com/Backblaze/B2_Command_Line_Tool/issues/936 - while stdout.startswith('/'): - stdout = stdout.split('\n', 1)[-1] - assert re.search(expected_pattern, stdout + stderr), \ f'did not match pattern="{expected_pattern}", stdout="{stdout}", stderr="{stderr}"'