From 2b2711f7d52070b3d45cc4bdd4d6dea8bcb39d91 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 25 Jun 2024 14:00:10 +0200 Subject: [PATCH 1/7] feat(tests): Test common against 3.13 --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 250eec9a16..bd1aa02f59 100644 --- a/tox.ini +++ b/tox.ini @@ -6,10 +6,10 @@ [tox] requires = # This version introduced using pip 24.1 which does not work with older Celery and HTTPX versions. - virtualenv<20.26.3 + virtualenv<20.26.3 envlist = # === Common === - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-common # === Gevent === {py3.6,py3.8,py3.10,py3.11}-gevent @@ -262,11 +262,11 @@ deps = # === Common === py3.8-common: hypothesis - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest-asyncio + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-common: pytest-asyncio # See https://github.com/pytest-dev/pytest/issues/9621 # and https://github.com/pytest-dev/pytest-forked/issues/67 # for justification of the upper bound on pytest - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest<7.0.0 + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-common: pytest<7.0.0 # === Gevent === {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: gevent>=22.10.0, <22.11.0 From 240fc01d91a6f7f38e3ae83b2884ea9ffd7d17cc Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 25 Jun 2024 14:01:49 +0200 Subject: [PATCH 2/7] fix ci yaml --- .github/workflows/test-integrations-common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index e611db9894..e98000162e 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 From 854dbf02a568b4aae40d6c4019d3bb03f24fc4df Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 25 Jun 2024 14:05:02 +0200 Subject: [PATCH 3/7] allow prereleases --- .github/workflows/test-integrations-ai.yml | 2 ++ .github/workflows/test-integrations-aws-lambda.yml | 1 + .github/workflows/test-integrations-cloud-computing.yml | 2 ++ .github/workflows/test-integrations-common.yml | 1 + .github/workflows/test-integrations-data-processing.yml | 2 ++ .github/workflows/test-integrations-databases.yml | 2 ++ .github/workflows/test-integrations-graphql.yml | 2 ++ .github/workflows/test-integrations-miscellaneous.yml | 2 ++ .github/workflows/test-integrations-networking.yml | 2 ++ .github/workflows/test-integrations-web-frameworks-1.yml | 2 ++ .github/workflows/test-integrations-web-frameworks-2.yml | 2 ++ scripts/split-tox-gh-actions/templates/test_group.jinja | 1 + 12 files changed, 21 insertions(+) diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index b92ed9c61d..2bc715ccd2 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -83,6 +84,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-aws-lambda.yml b/.github/workflows/test-integrations-aws-lambda.yml index 4bb2b11131..6ca520bb47 100644 --- a/.github/workflows/test-integrations-aws-lambda.yml +++ b/.github/workflows/test-integrations-aws-lambda.yml @@ -63,6 +63,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true needs: check-permissions steps: - uses: actions/checkout@v4.1.7 diff --git a/.github/workflows/test-integrations-cloud-computing.yml b/.github/workflows/test-integrations-cloud-computing.yml index ece522c437..833dc97af5 100644 --- a/.github/workflows/test-integrations-cloud-computing.yml +++ b/.github/workflows/test-integrations-cloud-computing.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -79,6 +80,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index e98000162e..42c4f02e58 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-data-processing.yml b/.github/workflows/test-integrations-data-processing.yml index be2ffc24e1..f1cbdca3f4 100644 --- a/.github/workflows/test-integrations-data-processing.yml +++ b/.github/workflows/test-integrations-data-processing.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -89,6 +90,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-databases.yml b/.github/workflows/test-integrations-databases.yml index e03aa8aa60..461db4eb32 100644 --- a/.github/workflows/test-integrations-databases.yml +++ b/.github/workflows/test-integrations-databases.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true services: postgres: image: postgres @@ -106,6 +107,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true services: postgres: image: postgres diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index e210280f9b..0b115d8a6b 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -79,6 +80,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-miscellaneous.yml b/.github/workflows/test-integrations-miscellaneous.yml index 1dd1b9c607..5b21c2b830 100644 --- a/.github/workflows/test-integrations-miscellaneous.yml +++ b/.github/workflows/test-integrations-miscellaneous.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -79,6 +80,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-networking.yml b/.github/workflows/test-integrations-networking.yml index e5c26cc2a3..deb3aac72a 100644 --- a/.github/workflows/test-integrations-networking.yml +++ b/.github/workflows/test-integrations-networking.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -79,6 +80,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/.github/workflows/test-integrations-web-frameworks-1.yml b/.github/workflows/test-integrations-web-frameworks-1.yml index 00634b920d..c3ecf59f98 100644 --- a/.github/workflows/test-integrations-web-frameworks-1.yml +++ b/.github/workflows/test-integrations-web-frameworks-1.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true services: postgres: image: postgres @@ -97,6 +98,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true services: postgres: image: postgres diff --git a/.github/workflows/test-integrations-web-frameworks-2.yml b/.github/workflows/test-integrations-web-frameworks-2.yml index d6c593e2c7..e3b3e7a93b 100644 --- a/.github/workflows/test-integrations-web-frameworks-2.yml +++ b/.github/workflows/test-integrations-web-frameworks-2.yml @@ -31,6 +31,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 @@ -99,6 +100,7 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 diff --git a/scripts/split-tox-gh-actions/templates/test_group.jinja b/scripts/split-tox-gh-actions/templates/test_group.jinja index 823a3b9b01..8b168711ef 100644 --- a/scripts/split-tox-gh-actions/templates/test_group.jinja +++ b/scripts/split-tox-gh-actions/templates/test_group.jinja @@ -11,6 +11,7 @@ # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] + allow-prereleases: true {% if needs_github_secrets %} needs: check-permissions From 4f5fe0a5c8d091ce28cdd8eaf90292120c0a6496 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 25 Jun 2024 14:08:48 +0200 Subject: [PATCH 4/7] fix --- .github/workflows/test-integrations-ai.yml | 4 ++-- .github/workflows/test-integrations-aws-lambda.yml | 2 +- .github/workflows/test-integrations-cloud-computing.yml | 4 ++-- .github/workflows/test-integrations-common.yml | 2 +- .github/workflows/test-integrations-data-processing.yml | 4 ++-- .github/workflows/test-integrations-databases.yml | 4 ++-- .github/workflows/test-integrations-graphql.yml | 4 ++-- .github/workflows/test-integrations-miscellaneous.yml | 4 ++-- .github/workflows/test-integrations-networking.yml | 4 ++-- .github/workflows/test-integrations-web-frameworks-1.yml | 4 ++-- .github/workflows/test-integrations-web-frameworks-2.yml | 4 ++-- scripts/split-tox-gh-actions/templates/test_group.jinja | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index 2bc715ccd2..4cc8a5595b 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -84,12 +84,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-aws-lambda.yml b/.github/workflows/test-integrations-aws-lambda.yml index 6ca520bb47..0a28e17487 100644 --- a/.github/workflows/test-integrations-aws-lambda.yml +++ b/.github/workflows/test-integrations-aws-lambda.yml @@ -63,7 +63,6 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true needs: check-permissions steps: - uses: actions/checkout@v4.1.7 @@ -72,6 +71,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-cloud-computing.yml b/.github/workflows/test-integrations-cloud-computing.yml index 833dc97af5..fabbe46979 100644 --- a/.github/workflows/test-integrations-cloud-computing.yml +++ b/.github/workflows/test-integrations-cloud-computing.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -80,12 +80,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 42c4f02e58..bdd131f21b 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-data-processing.yml b/.github/workflows/test-integrations-data-processing.yml index f1cbdca3f4..c194d571ac 100644 --- a/.github/workflows/test-integrations-data-processing.yml +++ b/.github/workflows/test-integrations-data-processing.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Start Redis uses: supercharge/redis-github-action@1.8.0 - name: Setup Test Env @@ -90,12 +90,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Start Redis uses: supercharge/redis-github-action@1.8.0 - name: Setup Test Env diff --git a/.github/workflows/test-integrations-databases.yml b/.github/workflows/test-integrations-databases.yml index 461db4eb32..60cbf3c268 100644 --- a/.github/workflows/test-integrations-databases.yml +++ b/.github/workflows/test-integrations-databases.yml @@ -31,7 +31,6 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true services: postgres: image: postgres @@ -55,6 +54,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - uses: getsentry/action-clickhouse-in-ci@v1 - name: Setup Test Env run: | @@ -107,7 +107,6 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true services: postgres: image: postgres @@ -131,6 +130,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - uses: getsentry/action-clickhouse-in-ci@v1 - name: Setup Test Env run: | diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index 0b115d8a6b..f870693bd6 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -80,12 +80,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-miscellaneous.yml b/.github/workflows/test-integrations-miscellaneous.yml index 5b21c2b830..34f11ff3d8 100644 --- a/.github/workflows/test-integrations-miscellaneous.yml +++ b/.github/workflows/test-integrations-miscellaneous.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -80,12 +80,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-networking.yml b/.github/workflows/test-integrations-networking.yml index deb3aac72a..87fcf9aab2 100644 --- a/.github/workflows/test-integrations-networking.yml +++ b/.github/workflows/test-integrations-networking.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -80,12 +80,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-web-frameworks-1.yml b/.github/workflows/test-integrations-web-frameworks-1.yml index c3ecf59f98..ae3f159523 100644 --- a/.github/workflows/test-integrations-web-frameworks-1.yml +++ b/.github/workflows/test-integrations-web-frameworks-1.yml @@ -31,7 +31,6 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true services: postgres: image: postgres @@ -55,6 +54,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -98,7 +98,6 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true services: postgres: image: postgres @@ -122,6 +121,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/.github/workflows/test-integrations-web-frameworks-2.yml b/.github/workflows/test-integrations-web-frameworks-2.yml index e3b3e7a93b..2f33cbf0d6 100644 --- a/.github/workflows/test-integrations-web-frameworks-2.yml +++ b/.github/workflows/test-integrations-web-frameworks-2.yml @@ -31,12 +31,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox @@ -100,12 +100,12 @@ jobs: # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup Test Env run: | pip install coverage tox diff --git a/scripts/split-tox-gh-actions/templates/test_group.jinja b/scripts/split-tox-gh-actions/templates/test_group.jinja index 8b168711ef..67fdf9a47d 100644 --- a/scripts/split-tox-gh-actions/templates/test_group.jinja +++ b/scripts/split-tox-gh-actions/templates/test_group.jinja @@ -11,7 +11,6 @@ # ubuntu-20.04 is the last version that supported python3.6 # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 os: [ubuntu-20.04] - allow-prereleases: true {% if needs_github_secrets %} needs: check-permissions @@ -50,6 +49,7 @@ - uses: actions/setup-python@v5 with: python-version: {% raw %}${{ matrix.python-version }}{% endraw %} + allow-prereleases: true {% if needs_clickhouse %} - uses: getsentry/action-clickhouse-in-ci@v1 {% endif %} From b9d1e3e1f2494c64e8683075c4568d40b8c1f5d3 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 16 Jul 2024 16:22:07 +0300 Subject: [PATCH 5/7] fix(utils): Handle `partialmethod` in `qualname_from_function` (CPython 3.13) (#3272) The `_partialmethod` attribute of methods wrapped with `partialmethod()` was renamed to `__partialmethod__` in CPython 3.13: https://github.com/python/cpython/pull/16600 --- sentry_sdk/utils.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py index a84f2eb3de..9eb1cb3e36 100644 --- a/sentry_sdk/utils.py +++ b/sentry_sdk/utils.py @@ -1330,14 +1330,18 @@ def qualname_from_function(func): prefix, suffix = "", "" - if hasattr(func, "_partialmethod") and isinstance( - func._partialmethod, partialmethod - ): - prefix, suffix = "partialmethod()" - func = func._partialmethod.func - elif isinstance(func, partial) and hasattr(func.func, "__name__"): + if isinstance(func, partial) and hasattr(func.func, "__name__"): prefix, suffix = "partial()" func = func.func + else: + # The _partialmethod attribute of methods wrapped with partialmethod() was renamed to __partialmethod__ in CPython 3.13: + # https://github.com/python/cpython/pull/16600 + partial_method = getattr(func, "_partialmethod", None) or getattr( + func, "__partialmethod__", None + ) + if isinstance(partial_method, partialmethod): + prefix, suffix = "partialmethod()" + func = partial_method.func if hasattr(func, "__qualname__"): func_qualname = func.__qualname__ From 49b4cf328e115d5639e8bdc7b0978a8abf7c2fb6 Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Tue, 16 Jul 2024 16:23:47 +0300 Subject: [PATCH 6/7] fix(tests): Fix exception on copying `frame.f_locals` (Python 3.13) (#3271) Starting from Python 3.13, `frame.f_locals` is not `dict` anymore, but `FrameLocalsProxy`, that cannot be copied using `copy.copy()`. In Python 3.13 and later, it should be copied using a method `.copy()`. The new way of copying works the same as the old one for versions of Python prior to 3.13, according to the documentation (both copying methods produce a shallow copy). Since Python 3.13, `FrameLocalsProxy` skips items of `locals()` that have non-`str` keys; this is a CPython implementation detail, so we hence disable `test_non_string_variables` test on Python 3.13. See: https://peps.python.org/pep-0667/ https://github.com/python/cpython/issues/118921 https://github.com/python/cpython/pull/118923 https://docs.python.org/3.13/whatsnew/3.13.html#porting-to-python-3-13 https://docs.python.org/3/library/copy.html https://github.com/python/cpython/blame/7b413952e817ae87bfda2ac85dd84d30a6ce743b/Objects/frameobject.c#L148 --- sentry_sdk/utils.py | 3 +-- tests/test_client.py | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py index 9eb1cb3e36..41a6849b3d 100644 --- a/sentry_sdk/utils.py +++ b/sentry_sdk/utils.py @@ -11,7 +11,6 @@ import threading import time from collections import namedtuple -from copy import copy from datetime import datetime from decimal import Decimal from functools import partial, partialmethod, wraps @@ -618,7 +617,7 @@ def serialize_frame( ) if include_local_variables: - rv["vars"] = copy(frame.f_locals) + rv["vars"] = frame.f_locals.copy() return rv diff --git a/tests/test_client.py b/tests/test_client.py index 0464f32b5e..447359a11c 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -31,6 +31,12 @@ from sentry_sdk._types import Event +maximum_python_312 = pytest.mark.skipif( + sys.version_info > (3, 12), + reason="Since Python 3.13, `FrameLocalsProxy` skips items of `locals()` that have non-`str` keys; this is a CPython implementation detail: https://github.com/python/cpython/blame/7b413952e817ae87bfda2ac85dd84d30a6ce743b/Objects/frameobject.c#L148", +) + + class EnvelopeCapturedError(Exception): pass @@ -879,6 +885,7 @@ class FooError(Exception): assert exception["mechanism"]["meta"]["errno"]["number"] == 69 +@maximum_python_312 def test_non_string_variables(sentry_init, capture_events): """There is some extremely terrible code in the wild that inserts non-strings as variable names into `locals()`.""" From 7508cb5ca60a6ad043111551aada4a767e2b72a5 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 16 Jul 2024 15:31:15 +0200 Subject: [PATCH 7/7] need new pytest for 3.13 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e65d7739d3..1377b747a3 100644 --- a/tox.ini +++ b/tox.ini @@ -275,7 +275,8 @@ deps = # See https://github.com/pytest-dev/pytest/issues/9621 # and https://github.com/pytest-dev/pytest-forked/issues/67 # for justification of the upper bound on pytest - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12,py3.13}-common: pytest<7.0.0 + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest<7.0.0 + py3.13-common: pytest # === Gevent === {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-gevent: gevent>=22.10.0, <22.11.0