From e0f826da91d342dc517b07eb805229d0a7ff18b2 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 13:02:42 +0100 Subject: [PATCH 01/53] Reorganize tox.ini --- tox.ini | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tox.ini b/tox.ini index c38d60332c..f02489114e 100644 --- a/tox.ini +++ b/tox.ini @@ -19,20 +19,24 @@ envlist = # {py3.7,py3.10}-django-v{3.2,4.0} # AIOHTTP - {py3.7}-aiohttp-v{3.5} - {py3.7,py3.8,py3.9,py3.10,py3.11}-aiohttp-v{3.6} + {py3.6}-aiohttp-v{3.4} + {py3.7,py3.8,py3.9,py3.10,py3.11}-aiohttp-v{3.8} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-aiohttp-latest # Ariadne - {py3.8,py3.9,py3.10,py3.11,py3.12}-ariadne + {py3.8,py3.9,py3.10,py3.11}-ariadne-v{0.20} + {py3.8,py3.9,py3.10,py3.11,py3.12}-ariadne-latest # Arq - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-arq + {py3.7,py3.8,py3.9,py3.10,py3.11}-arq-v{0.23} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-arq-latest # Asgi {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asgi # asyncpg - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg-v{0.23} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg-latest # AWS Lambda # The aws_lambda tests deploy to the real AWS and have their own @@ -109,7 +113,7 @@ envlist = # Graphene {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-graphene - # Grpc + # gRPC {py3.7,py3.8,py3.9,py3.10}-grpc-v{1.40,1.44,1.48} {py3.7,py3.8,py3.9,py3.10,py3.11}-grpc-v{1.54,1.56,1.58} {py3.12}-grpc-v{1.59} @@ -205,17 +209,20 @@ deps = # AIOHTTP aiohttp-v3.4: aiohttp>=3.4.0,<3.5.0 - aiohttp-v3.5: aiohttp>=3.5.0,<3.6.0 + aiohttp-v3.8: aiohttp>=3.8.0,<3.9.0 + aiohttp-latest: aiohttp aiohttp: pytest-aiohttp # Ariadne - ariadne: ariadne>=0.20 + ariadne-v0.20: ariadne>=0.20,<0.21 + ariadne-latest: ariadne ariadne: fastapi ariadne: flask ariadne: httpx # Arq - arq: arq>=0.23.0 + arq-v0.23: arq>=0.23.0,<0.24.0 + arq-latest: arq arq: fakeredis>=2.2.0,<2.8 arq: pytest-asyncio arq: async-timeout @@ -225,8 +232,9 @@ deps = asgi: async-asgi-testclient # Asyncpg + asyncpg-v0.23: asyncpg>=0.23.0,<0.24.0 + asyncpg-latest: asyncpg asyncpg: pytest-asyncio - asyncpg: asyncpg # AWS Lambda aws_lambda: boto3 From 1c8f27738e52ab5f874de953e55a21b40b0fd6eb Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 13:15:53 +0100 Subject: [PATCH 02/53] wip --- .../workflows/test-integration-aiohttp.yml | 2 +- tox.ini | 37 +++++++++---------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index f70d652f2e..7cde825f80 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/tox.ini b/tox.ini index f02489114e..d7128a1e35 100644 --- a/tox.ini +++ b/tox.ini @@ -45,10 +45,12 @@ envlist = {py3.9}-aws_lambda # Beam - {py3.7}-beam-v{2.12,2.13,2.32,2.33} + {py3.7}-beam-v{2.12,2.20,2.51} + {py3.7}-beam-latest # Boto3 - {py2.7,py3.6,py3.7,py3.8}-boto3-v{1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16} + {py2.7,py3.6,py3.7,py3.8}-boto3-v{1.12,1.21,1.29} + {py2.7,py3.6,py3.7,py3.8}-boto3-latest # Bottle {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-v{0.12} @@ -208,20 +210,20 @@ deps = {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest-asyncio # AIOHTTP - aiohttp-v3.4: aiohttp>=3.4.0,<3.5.0 - aiohttp-v3.8: aiohttp>=3.8.0,<3.9.0 + aiohttp-v3.4: aiohttp~=3.4.0 + aiohttp-v3.8: aiohttp~=3.8.0 aiohttp-latest: aiohttp aiohttp: pytest-aiohttp # Ariadne - ariadne-v0.20: ariadne>=0.20,<0.21 + ariadne-v0.20: ariadne~=0.20.0 ariadne-latest: ariadne ariadne: fastapi ariadne: flask ariadne: httpx # Arq - arq-v0.23: arq>=0.23.0,<0.24.0 + arq-v0.23: arq~=0.23.0 arq-latest: arq arq: fakeredis>=2.2.0,<2.8 arq: pytest-asyncio @@ -232,7 +234,7 @@ deps = asgi: async-asgi-testclient # Asyncpg - asyncpg-v0.23: asyncpg>=0.23.0,<0.24.0 + asyncpg-v0.23: asyncpg~=0.23.0 asyncpg-latest: asyncpg asyncpg: pytest-asyncio @@ -240,21 +242,16 @@ deps = aws_lambda: boto3 # Beam - beam-v2.12: apache-beam>=2.12.0, <2.13.0 - beam-v2.13: apache-beam>=2.13.0, <2.14.0 - beam-v2.32: apache-beam>=2.32.0, <2.33.0 - beam-v2.33: apache-beam>=2.33.0, <2.34.0 - beam-master: git+https://github.com/apache/beam#egg=apache-beam&subdirectory=sdks/python + beam-v2.12: apache-beam~=2.12.0 + beam-v2.20: apache-beam~=2.20.0 + beam-v2.51: apache-beam~=2.51.0 + beam-latest: apache-beam # Boto3 - boto3-v1.9: boto3>=1.9,<1.10 - boto3-v1.10: boto3>=1.10,<1.11 - boto3-v1.11: boto3>=1.11,<1.12 - boto3-v1.12: boto3>=1.12,<1.13 - boto3-v1.13: boto3>=1.13,<1.14 - boto3-v1.14: boto3>=1.14,<1.15 - boto3-v1.15: boto3>=1.15,<1.16 - boto3-v1.16: boto3>=1.16,<1.17 + boto3-v1.12: boto3~=1.12.0 + boto3-v1.21: boto3~=1.21.0 + boto3-v1.29: boto3~=1.29.0 + boto3-latest: boto3 # Bottle bottle: Werkzeug<2.1.0 From 3b21dc3eed68f540a0546f1524dd538352f594b9 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 13:54:16 +0100 Subject: [PATCH 03/53] wip --- .../workflows/test-integration-aiohttp.yml | 2 +- .../workflows/test-integration-asyncpg.yml | 2 +- .github/workflows/test-integration-beam.yml | 2 +- .github/workflows/test-integration-boto3.yml | 2 +- tox.ini | 19 +++++++++++-------- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index 7cde825f80..18a599ba62 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -31,7 +31,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.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index 4b2ed26671..de6ad8c9c0 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index a86d6ccd7d..7e828e837b 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7"] + python-version: ["3.7","3.8"] # 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 diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index fb246c899e..6f06a3cdb8 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.9","3.10","3.11","3.12"] # 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 diff --git a/tox.ini b/tox.ini index d7128a1e35..665098ceba 100644 --- a/tox.ini +++ b/tox.ini @@ -19,9 +19,9 @@ envlist = # {py3.7,py3.10}-django-v{3.2,4.0} # AIOHTTP - {py3.6}-aiohttp-v{3.4} + {py3.7}-aiohttp-v{3.4} {py3.7,py3.8,py3.9,py3.10,py3.11}-aiohttp-v{3.8} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-aiohttp-latest + {py3.8,py3.9,py3.10,py3.11,py3.12}-aiohttp-latest # Ariadne {py3.8,py3.9,py3.10,py3.11}-ariadne-v{0.20} @@ -35,8 +35,8 @@ envlist = {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asgi # asyncpg - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg-v{0.23} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg-latest + {py3.7,py3.8,py3.9,py3.10,py3.11}-asyncpg-v{0.23} + {py3.8,py3.9,py3.10,py3.11}-asyncpg-latest # AWS Lambda # The aws_lambda tests deploy to the real AWS and have their own @@ -45,12 +45,14 @@ envlist = {py3.9}-aws_lambda # Beam - {py3.7}-beam-v{2.12,2.20,2.51} - {py3.7}-beam-latest + {py3.7}-beam-v{2.12,2.20,2.48} + {py3.8}-beam-latest # Boto3 - {py2.7,py3.6,py3.7,py3.8}-boto3-v{1.12,1.21,1.29} - {py2.7,py3.6,py3.7,py3.8}-boto3-latest + {py2.7,py3.6,py3.7}-boto3-v{1.12} + {py3.6,py3.7,py3.8,py3.9,py3.10}-boto3-v{1.21} + {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-v{1.29} + {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-latest # Bottle {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-v{0.12} @@ -224,6 +226,7 @@ deps = # Arq arq-v0.23: arq~=0.23.0 + arq-v0.23: pydantic<2 arq-latest: arq arq: fakeredis>=2.2.0,<2.8 arq: pytest-asyncio From 2e4dda2dba56afdfe3dcd4c34b18a0bc5be1e9d7 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 14:05:13 +0100 Subject: [PATCH 04/53] wip --- .github/workflows/test-integration-beam.yml | 2 +- .github/workflows/test-integration-boto3.yml | 2 +- tox.ini | 36 ++++++++------------ 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 7e828e837b..406f5849cc 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8"] + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index 6f06a3cdb8..d18c716761 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.9","3.10","3.11","3.12"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/tox.ini b/tox.ini index 665098ceba..7ea061c066 100644 --- a/tox.ini +++ b/tox.ini @@ -45,25 +45,25 @@ envlist = {py3.9}-aws_lambda # Beam - {py3.7}-beam-v{2.12,2.20,2.48} - {py3.8}-beam-latest + {py3.7}-beam-v{2.12} + {py3.8,py3.9,py3.10,py3.11,py3.12}-beam-latest # Boto3 {py2.7,py3.6,py3.7}-boto3-v{1.12} - {py3.6,py3.7,py3.8,py3.9,py3.10}-boto3-v{1.21} {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-v{1.29} {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-latest # Bottle - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-v{0.12} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-bottle-v{0.12} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-latest # Celery {py2.7}-celery-v{3} - {py2.7,py3.5,py3.6}-celery-v{4.1,4.2} - {py2.7,py3.5,py3.6,py3.7,py3.8}-celery-v{4.3,4.4} + {py2.7,py3.5,py3.6,py3.7,py3.8}-celery-v{4} {py3.6,py3.7,py3.8}-celery-v{5.0} {py3.7,py3.8,py3.9,py3.10}-celery-v{5.1,5.2} {py3.8,py3.9,py3.10,py3.11}-celery-v{5.3} + {py3.8,py3.9,py3.10,py3.11}-celery-latest # Chalice {py3.6,py3.7,py3.8}-chalice-v{1.18,1.20,1.22,1.24} @@ -246,8 +246,6 @@ deps = # Beam beam-v2.12: apache-beam~=2.12.0 - beam-v2.20: apache-beam~=2.20.0 - beam-v2.51: apache-beam~=2.51.0 beam-latest: apache-beam # Boto3 @@ -258,22 +256,18 @@ deps = # Bottle bottle: Werkzeug<2.1.0 - bottle-v0.12: bottle>=0.12,<0.13 + bottle-v0.12: bottle~=0.12.0 + bottle-latest: bottle # Celery celery: redis - celery-v3: Celery>=3.1,<4.0 - celery-v4.1: Celery>=4.1,<4.2 - celery-v4.2: Celery>=4.2,<4.3 - celery-v4.3: Celery>=4.3,<4.4 - # https://github.com/celery/vine/pull/29#issuecomment-689498382 - celery-4.3: vine<5.0.0 - # https://github.com/celery/celery/issues/6153 - celery-v4.4: Celery>=4.4,<4.5,!=4.4.4 - celery-v5.0: Celery>=5.0,<5.1 - celery-v5.1: Celery>=5.1,<5.2 - celery-v5.2: Celery>=5.2,<5.3 - celery-v5.3: Celery>=5.3,<5.4 + celery-v3: Celery~=3.0 + celery-v4: Celery~=4.0 + celery-v5.0: Celery~=5.0.0 + celery-v5.1: Celery~=5.1.0 + celery-v5.2: Celery~=5.2.0 + celery-v5.3: Celery~=5.3.0 + celery-latest: Celery {py3.5}-celery: newrelic<6.0.0 {py3.7}-celery: importlib-metadata<5.0 From 44aea84fe05fde946fe2c9cd119ccd38ec8041a6 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 14:08:17 +0100 Subject: [PATCH 05/53] wip --- .github/workflows/test-integration-aiohttp.yml | 2 +- tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index 18a599ba62..f70d652f2e 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/tox.ini b/tox.ini index 7ea061c066..e16177f7ae 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,7 @@ envlist = # AIOHTTP {py3.7}-aiohttp-v{3.4} {py3.7,py3.8,py3.9,py3.10,py3.11}-aiohttp-v{3.8} - {py3.8,py3.9,py3.10,py3.11,py3.12}-aiohttp-latest + {py3.8,py3.9,py3.10,py3.11}-aiohttp-latest # Ariadne {py3.8,py3.9,py3.10,py3.11}-ariadne-v{0.20} @@ -35,7 +35,7 @@ envlist = {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-asgi # asyncpg - {py3.7,py3.8,py3.9,py3.10,py3.11}-asyncpg-v{0.23} + {py3.7,py3.8,py3.9,py3.10}-asyncpg-v{0.23} {py3.8,py3.9,py3.10,py3.11}-asyncpg-latest # AWS Lambda From c52cb9e853bfbe2c9a2b1b56411f4fd0799a8cfe Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 14:31:29 +0100 Subject: [PATCH 06/53] wip --- .../workflows/test-integration-asyncpg.yml | 2 +- .github/workflows/test-integration-beam.yml | 2 +- .../workflows/test-integration-chalice.yml | 2 +- tox.ini | 61 +++++++++---------- 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index de6ad8c9c0..4b2ed26671 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 406f5849cc..3f9f3ee27a 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 6615aeb75d..37085a40c3 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8"] + python-version: ["3.6","3.7","3.8","3.9","3.10"] # 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 diff --git a/tox.ini b/tox.ini index e16177f7ae..f9045f86dd 100644 --- a/tox.ini +++ b/tox.ini @@ -36,7 +36,7 @@ envlist = # asyncpg {py3.7,py3.8,py3.9,py3.10}-asyncpg-v{0.23} - {py3.8,py3.9,py3.10,py3.11}-asyncpg-latest + {py3.8,py3.9,py3.10,py3.11,py3.12}-asyncpg-latest # AWS Lambda # The aws_lambda tests deploy to the real AWS and have their own @@ -46,7 +46,7 @@ envlist = # Beam {py3.7}-beam-v{2.12} - {py3.8,py3.9,py3.10,py3.11,py3.12}-beam-latest + {py3.8,py3.9,py3.10,py3.11}-beam-latest # Boto3 {py2.7,py3.6,py3.7}-boto3-v{1.12} @@ -66,24 +66,25 @@ envlist = {py3.8,py3.9,py3.10,py3.11}-celery-latest # Chalice - {py3.6,py3.7,py3.8}-chalice-v{1.18,1.20,1.22,1.24} + {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-v{1.16,1.28} + {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-latest # Clickhouse Driver - {py3.8,py3.9,py3.10,py3.11}-clickhouse_driver-v{0.2.4,0.2.5,0.2.6} - {py3.12}-clickhouse_driver-v{0.2.6} + {py3.8,py3.9,py3.10,py3.11}-clickhouse_driver-v{0.2.0} + {py3.8,py3.9,py3.10,py3.11,py3.12}-clickhouse_driver-latest # Cloud Resource Context {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-cloud_resource_context # Django # - Django 1.x - {py2.7,py3.5}-django-v{1.8,1.9,1.10} + {py2.7,py3.5}-django-v{1.7} {py2.7,py3.5,py3.6,py3.7}-django-v{1.11} # - Django 2.x - {py3.5,py3.6,py3.7}-django-v{2.0,2.1} + {py3.5,py3.6,py3.7}-django-v{2.0} {py3.5,py3.6,py3.7,py3.8,py3.9}-django-v{2.2} # - Django 3.x - {py3.6,py3.7,py3.8,py3.9}-django-v{3.0,3.1} + {py3.6,py3.7,py3.8,py3.9}-django-v{3.0} {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-django-v{3.2} # - Django 4.x {py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{4.0,4.1,4.2} @@ -274,49 +275,43 @@ deps = {py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-celery: newrelic # Chalice - chalice-v1.18: chalice>=1.18.0,<1.19.0 - chalice-v1.20: chalice>=1.20.0,<1.21.0 - chalice-v1.22: chalice>=1.22.0,<1.23.0 - chalice-v1.24: chalice>=1.24.0,<1.25.0 + chalice-v1.16: chalice~=1.16.0 + chalice-v1.28: chalice~=1.28.0 + chalice-latest: chalice chalice: pytest-chalice==0.0.5 {py3.7}-chalice: botocore~=1.31 {py3.8}-chalice: botocore~=1.31 # Clickhouse Driver - clickhouse_driver-v0.2.4: clickhouse_driver>=0.2.4,<0.2.5 - clickhouse_driver-v0.2.5: clickhouse_driver>=0.2.5,<0.2.6 - clickhouse_driver-v0.2.6: clickhouse_driver>=0.2.6,<0.2.7 + clickhouse_driver-v0.2.0: clickhouse_driver~=0.2.0 + clickhouse_driver-latest: clickhouse_driver # Django django: psycopg2-binary django: Werkzeug<2.1.0 django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: djangorestframework>=3.0.0,<4.0.0 - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2,4.0,4.1,4.2,5.0}: pytest-asyncio - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2,4.0,4.1,4.2,5.0}: channels[daphne]>2 + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,.2,4.0,4.1,4.2,5.0}: pytest-asyncio + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne]>2 - django-v{1.8,1.9,1.10,1.11,2.0,2.1}: pytest-django<4.0 - django-v{2.2,3.0,3.1,3.2}: pytest-django>=4.0 - django-v{2.2,3.0,3.1,3.2}: Werkzeug<2.0 + django-v{1.7,1.11,2.0}: pytest-django<4.0 + django-v{2.2,3.0,3.2}: pytest-django>=4.0 + django-v{2.2,3.0,3.2}: Werkzeug<2.0 django-v{4.0,4.1,4.2,5.0}: djangorestframework django-v{4.0,4.1,4.2,5.0}: pytest-asyncio django-v{4.0,4.1,4.2,5.0}: pytest-django django-v{4.0,4.1,4.2,5.0}: Werkzeug - django-v1.8: Django>=1.8,<1.9 - django-v1.9: Django>=1.9,<1.10 - django-v1.10: Django>=1.10,<1.11 - django-v1.11: Django>=1.11,<1.12 - django-v2.0: Django>=2.0,<2.1 - django-v2.1: Django>=2.1,<2.2 - django-v2.2: Django>=2.2,<2.3 - django-v3.0: Django>=3.0,<3.1 - django-v3.1: Django>=3.1,<3.2 - django-v3.2: Django>=3.2,<3.3 - django-v4.0: Django>=4.0,<4.1 - django-v4.1: Django>=4.1,<4.2 - django-v4.2: Django>=4.2,<4.3 + django-v1.7: Django~=1.8.0 + django-v1.11: Django~=1.11.0 + django-v2.0: Django~=2.0.0 + django-v2.2: Django~=2.2.0 + django-v3.0: Django~=3.0.0 + django-v3.2: Django~=3.2.0 + django-v4.0: Django~=4.0.0 + django-v4.1: Django~=4.1.0 + django-v4.2: Django~=4.2.0 # TODO: change to final when available django-v5.0: Django==5.0b1 From 3f9cd4c3d9144dcbe221b3da37057489a3672479 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 15:18:01 +0100 Subject: [PATCH 07/53] try to fix chalice tests --- tests/integrations/chalice/test_chalice.py | 36 +++++++++++++--------- tox.ini | 11 ++++--- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/tests/integrations/chalice/test_chalice.py b/tests/integrations/chalice/test_chalice.py index 4162a55623..8a9feaeda9 100644 --- a/tests/integrations/chalice/test_chalice.py +++ b/tests/integrations/chalice/test_chalice.py @@ -3,7 +3,7 @@ from chalice import Chalice, BadRequestError from chalice.local import LambdaContext, LocalGateway -from sentry_sdk.integrations.chalice import ChaliceIntegration +from sentry_sdk.integrations.chalice import CHALICE_VERSION, ChaliceIntegration from sentry_sdk import capture_message from pytest_chalice.handlers import RequestHandler @@ -65,12 +65,10 @@ def lambda_context_args(): def test_exception_boom(app, client: RequestHandler) -> None: response = client.get("/boom") assert response.status_code == 500 - assert response.json == dict( - [ - ("Code", "InternalServerError"), - ("Message", "An internal server error occurred."), - ] - ) + assert response.json == { + "Code": "InternalServerError", + "Message": "An internal server error occurred.", + } def test_has_request(app, capture_events, client: RequestHandler): @@ -110,16 +108,26 @@ def every_hour(event): assert str(exc_info.value) == "schedule event!" -def test_bad_reques(client: RequestHandler) -> None: +@pytest.skipif(CHALICE_VERSION >= (1, 28)) +def test_bad_request_old(client: RequestHandler) -> None: response = client.get("/badrequest") assert response.status_code == 400 - assert response.json == dict( - [ - ("Code", "BadRequestError"), - ("Message", "BadRequestError: bad-request"), - ] - ) + assert response.json == { + "Code": "BadRequestError", + "Message": "BadRequestError: bad-request", + } + + +@pytest.skipif(CHALICE_VERSION < (1, 28)) +def test_bad_request(client: RequestHandler) -> None: + response = client.get("/badrequest") + + assert response.status_code == 400 + assert response.json == { + "Code": "BadRequestError", + "Message": "bad-request", + } @pytest.mark.parametrize( diff --git a/tox.ini b/tox.ini index f9045f86dd..ae3308bae7 100644 --- a/tox.ini +++ b/tox.ini @@ -66,8 +66,9 @@ envlist = {py3.8,py3.9,py3.10,py3.11}-celery-latest # Chalice - {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-v{1.16,1.28} - {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-latest + {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-v{1.16} + {py3.7,py3.8,py3.9,py3.10}-chalice-v{1.28} + {py3.7,py3.8,py3.9,py3.10}-chalice-latest # Clickhouse Driver {py3.8,py3.9,py3.10,py3.11}-clickhouse_driver-v{0.2.0} @@ -78,7 +79,7 @@ envlist = # Django # - Django 1.x - {py2.7,py3.5}-django-v{1.7} + {py2.7,py3.5}-django-v{1.8} {py2.7,py3.5,py3.6,py3.7}-django-v{1.11} # - Django 2.x {py3.5,py3.6,py3.7}-django-v{2.0} @@ -295,7 +296,7 @@ deps = {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,.2,4.0,4.1,4.2,5.0}: pytest-asyncio {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne]>2 - django-v{1.7,1.11,2.0}: pytest-django<4.0 + django-v{1.8,1.11,2.0}: pytest-django<4.0 django-v{2.2,3.0,3.2}: pytest-django>=4.0 django-v{2.2,3.0,3.2}: Werkzeug<2.0 django-v{4.0,4.1,4.2,5.0}: djangorestframework @@ -303,7 +304,7 @@ deps = django-v{4.0,4.1,4.2,5.0}: pytest-django django-v{4.0,4.1,4.2,5.0}: Werkzeug - django-v1.7: Django~=1.8.0 + django-v1.8: Django~=1.8.0 django-v1.11: Django~=1.11.0 django-v2.0: Django~=2.0.0 django-v2.2: Django~=2.2.0 From 18275e2dfb9a2169364a8da0b543dab09b3415da Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 15:21:37 +0100 Subject: [PATCH 08/53] fix skipif --- tests/integrations/chalice/test_chalice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integrations/chalice/test_chalice.py b/tests/integrations/chalice/test_chalice.py index 8a9feaeda9..4bbce15a87 100644 --- a/tests/integrations/chalice/test_chalice.py +++ b/tests/integrations/chalice/test_chalice.py @@ -108,7 +108,7 @@ def every_hour(event): assert str(exc_info.value) == "schedule event!" -@pytest.skipif(CHALICE_VERSION >= (1, 28)) +@pytest.mark.skipif(CHALICE_VERSION >= (1, 28)) def test_bad_request_old(client: RequestHandler) -> None: response = client.get("/badrequest") @@ -119,7 +119,7 @@ def test_bad_request_old(client: RequestHandler) -> None: } -@pytest.skipif(CHALICE_VERSION < (1, 28)) +@pytest.mark.skipif(CHALICE_VERSION < (1, 28)) def test_bad_request(client: RequestHandler) -> None: response = client.get("/badrequest") From 2602de42b984a4685e1c513a473cf06ecc9fa105 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 15:33:11 +0100 Subject: [PATCH 09/53] lets try that again --- tests/integrations/chalice/test_chalice.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integrations/chalice/test_chalice.py b/tests/integrations/chalice/test_chalice.py index 4bbce15a87..dd59cd2a27 100644 --- a/tests/integrations/chalice/test_chalice.py +++ b/tests/integrations/chalice/test_chalice.py @@ -3,8 +3,9 @@ from chalice import Chalice, BadRequestError from chalice.local import LambdaContext, LocalGateway -from sentry_sdk.integrations.chalice import CHALICE_VERSION, ChaliceIntegration from sentry_sdk import capture_message +from sentry_sdk.integrations.chalice import CHALICE_VERSION, ChaliceIntegration +from sentry_sdk.utils import parse_version from pytest_chalice.handlers import RequestHandler @@ -108,7 +109,7 @@ def every_hour(event): assert str(exc_info.value) == "schedule event!" -@pytest.mark.skipif(CHALICE_VERSION >= (1, 28)) +@pytest.mark.skipif(parse_version(CHALICE_VERSION) >= (1, 28)) def test_bad_request_old(client: RequestHandler) -> None: response = client.get("/badrequest") @@ -119,7 +120,7 @@ def test_bad_request_old(client: RequestHandler) -> None: } -@pytest.mark.skipif(CHALICE_VERSION < (1, 28)) +@pytest.mark.skipif(parse_version(CHALICE_VERSION) < (1, 28)) def test_bad_request(client: RequestHandler) -> None: response = client.get("/badrequest") From c8a33c742903f5e5eeac17618f4ad11e6c052f52 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 15:37:43 +0100 Subject: [PATCH 10/53] reason is apparently mandatory? --- tests/integrations/chalice/test_chalice.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integrations/chalice/test_chalice.py b/tests/integrations/chalice/test_chalice.py index dd59cd2a27..fbd4be4e59 100644 --- a/tests/integrations/chalice/test_chalice.py +++ b/tests/integrations/chalice/test_chalice.py @@ -109,7 +109,10 @@ def every_hour(event): assert str(exc_info.value) == "schedule event!" -@pytest.mark.skipif(parse_version(CHALICE_VERSION) >= (1, 28)) +@pytest.mark.skipif( + parse_version(CHALICE_VERSION) >= (1, 28), + reason="different behavior based on chalice version", +) def test_bad_request_old(client: RequestHandler) -> None: response = client.get("/badrequest") @@ -120,7 +123,10 @@ def test_bad_request_old(client: RequestHandler) -> None: } -@pytest.mark.skipif(parse_version(CHALICE_VERSION) < (1, 28)) +@pytest.mark.skipif( + parse_version(CHALICE_VERSION) < (1, 28), + reason="different behavior based on chalice version", +) def test_bad_request(client: RequestHandler) -> None: response = client.get("/badrequest") From 262c21557940ab4c967048fc585181c3856d1b97 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 15:53:54 +0100 Subject: [PATCH 11/53] wip --- .../workflows/test-integration-fastapi.yml | 2 +- tox.ini | 48 ++++++++++--------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 0a330b1401..5a2506c14e 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["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"] # 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 diff --git a/tox.ini b/tox.ini index ae3308bae7..70ee8c32a6 100644 --- a/tox.ini +++ b/tox.ini @@ -93,19 +93,21 @@ envlist = {py3.10,py3.11,py3.12}-django-v{5.0} # Falcon - {py2.7,py3.5,py3.6,py3.7}-falcon-v{1.4} - {py2.7,py3.5,py3.6,py3.7}-falcon-v{2.0} - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-falcon-v{3.0} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-falcon-v{3.1} + {py2.7,py3.5,py3.6,py3.7}-falcon-v{1,1.4,2} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-falcon-v{3} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-falcon-latest # FastAPI - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-fastapi + {py3.6,py3.7,py3.8,py3.9,py3.10}-fastapi-v{0.79} + {py3.8,py3.9,py3.10,py3.11,py3.12}-fastapi-latest # Flask - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0.11,0.12,1.0} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-flask-v{1.1} - {py3.6,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2.0} - {py3.10,py3.11,py3.12}-flask-v{3.0} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0.11} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-flask-v{1} + {py3.6,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} + {py3.10,py3.11,py3.12}-flask-v{3} + {py3.10,py3.11,py3.12}-flask-latest # Gevent {py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-gevent @@ -317,29 +319,31 @@ deps = django-v5.0: Django==5.0b1 # Falcon - falcon-v1.4: falcon>=1.4,<1.5 - falcon-v2.0: falcon>=2.0.0rc3,<3.0 - falcon-v3.0: falcon>=3.0.0,<3.1.0 - falcon-v3.1: falcon>=3.1.0,<3.2 + falcon-v1.4: falcon~=1.4.0 + falcon-v1: falcon~=1.0 + falcon-v2: falcon~=2.0 + falcon-v3: falcon~=3.0 + falcon-latest: falcon # FastAPI - fastapi: fastapi fastapi: httpx fastapi: anyio<4.0.0 # thats a dep of httpx fastapi: pytest-asyncio fastapi: python-multipart fastapi: requests + fastapi-v{0.79}: fastapi~=0.79.0 + fastapi-latest: fastapi # Flask flask: flask-login - flask-v{0.11,0.12,1.0,1.1,2.0}: Werkzeug<2.1.0 - flask-v{3.0}: Werkzeug - flask-v0.11: Flask>=0.11,<0.12 - flask-v0.12: Flask>=0.12,<0.13 - flask-v1.0: Flask>=1.0,<1.1 - flask-v1.1: Flask>=1.1,<1.2 - flask-v2.0: Flask>=2.0,<2.1 - flask-v3.0: Flask>=3.0,<3.1 + flask-v{0.11,0,1,2.0}: Werkzeug<2.1.0 + flask-v{3}: Werkzeug + flask-v0.11: Flask~=0.11.0 + flask-v0: Flask~=0.11 + flask-v1: Flask~=1.0 + flask-v2: Flask~=2.0 + flask-v3: Flask~=3.0 + flask-latest: Flask # Gevent # See http://www.gevent.org/install.html#older-versions-of-python From 12c31ea1e95b9c4e2138654aec4fa9ac5dc3b88e Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 16 Nov 2023 16:03:01 +0100 Subject: [PATCH 12/53] fix flask versions --- .github/workflows/test-integration-fastapi.yml | 2 +- .github/workflows/test-integration-flask.yml | 2 +- tox.ini | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 5a2506c14e..0a330b1401 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -31,7 +31,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.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index d716df171d..696899bb8b 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.5","3.6","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/tox.ini b/tox.ini index 70ee8c32a6..bc17cfd347 100644 --- a/tox.ini +++ b/tox.ini @@ -66,8 +66,7 @@ envlist = {py3.8,py3.9,py3.10,py3.11}-celery-latest # Chalice - {py3.6,py3.7,py3.8,py3.9,py3.10}-chalice-v{1.16} - {py3.7,py3.8,py3.9,py3.10}-chalice-v{1.28} + {py3.6,py3.7,py3.8,py3.9}-chalice-v{1.16} {py3.7,py3.8,py3.9,py3.10}-chalice-latest # Clickhouse Driver @@ -98,13 +97,11 @@ envlist = {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-falcon-latest # FastAPI - {py3.6,py3.7,py3.8,py3.9,py3.10}-fastapi-v{0.79} + {py3.7,py3.8,py3.9,py3.10}-fastapi-v{0.79} {py3.8,py3.9,py3.10,py3.11,py3.12}-fastapi-latest # Flask - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0.11} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-flask-v{1} + {py2.7,py3.5,py3.6}-flask-v{0,0.11,1} {py3.6,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} {py3.10,py3.11,py3.12}-flask-v{3} {py3.10,py3.11,py3.12}-flask-latest @@ -279,7 +276,6 @@ deps = # Chalice chalice-v1.16: chalice~=1.16.0 - chalice-v1.28: chalice~=1.28.0 chalice-latest: chalice chalice: pytest-chalice==0.0.5 From d0a7e6d93535f16a91db42d4e111621cb92af68d Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Fri, 17 Nov 2023 09:35:57 +0100 Subject: [PATCH 13/53] wip --- .github/workflows/test-integration-flask.yml | 2 +- tox.ini | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index 696899bb8b..d716df171d 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/tox.ini b/tox.ini index bc17cfd347..1b0d1b2734 100644 --- a/tox.ini +++ b/tox.ini @@ -101,8 +101,8 @@ envlist = {py3.8,py3.9,py3.10,py3.11,py3.12}-fastapi-latest # Flask - {py2.7,py3.5,py3.6}-flask-v{0,0.11,1} - {py3.6,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0,0.11,1} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} {py3.10,py3.11,py3.12}-flask-v{3} {py3.10,py3.11,py3.12}-flask-latest @@ -113,10 +113,12 @@ envlist = {py3.7}-gcp # GQL - {py3.7,py3.8,py3.9,py3.10,py3.11}-gql + {py3.7,py3.8,py3.9,py3.10,py3.11}-gql-v{3.4} + {py3.7,py3.8,py3.9,py3.10,py3.11}-gql-latest # Graphene - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-graphene + {py3.7,py3.8,py3.9,py3.10,py3.11}-graphene-v{3.3} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-graphene-latest # gRPC {py3.7,py3.8,py3.9,py3.10}-grpc-v{1.40,1.44,1.48} @@ -351,16 +353,18 @@ deps = {py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: gevent>=22.10.0, <22.11.0 # GQL - gql: gql[all] + gql-v{3.4}: gql[all]~=3.4.0 + gql-latest: gql[all] # Graphene - graphene: graphene>=3.3 graphene: blinker graphene: fastapi graphene: flask graphene: httpx + graphene-v{3.3}: graphene~=3.3.0 + graphene-latest: graphene - # Grpc + # gRPC grpc-v1.40: grpcio-tools>=1.40.0,<1.41.0 grpc-v1.44: grpcio-tools>=1.44.0,<1.45.0 grpc-v1.48: grpcio-tools>=1.48.0,<1.49.0 From 9c7d3b93006412d8e90977f20474abce9324f465 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Fri, 17 Nov 2023 10:07:42 +0100 Subject: [PATCH 14/53] wip --- tox.ini | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tox.ini b/tox.ini index 1b0d1b2734..b97f754341 100644 --- a/tox.ini +++ b/tox.ini @@ -121,20 +121,24 @@ envlist = {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-graphene-latest # gRPC - {py3.7,py3.8,py3.9,py3.10}-grpc-v{1.40,1.44,1.48} - {py3.7,py3.8,py3.9,py3.10,py3.11}-grpc-v{1.54,1.56,1.58} - {py3.12}-grpc-v{1.59} + {py3.7,py3.8,py3.9,py3.10}-grpc-v{1.21,1.30,1.40} + {py3.7,py3.8,py3.9,py3.10,py3.11}-grpc-v{1.50} + {py3.8,py3.9,py3.10,py3.11,py3.12}-grpc-latest # HTTPX - {py3.6,py3.7,py3.8,py3.9}-httpx-v{0.16,0.17,0.18} - {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-v{0.19,0.20,0.21,0.22} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-v{0.23} + {py3.6,py3.7,py3.8,py3.9}-httpx-v{0.16,0.18} + {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-v{0.20,0.22} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-v{0.23,0.24} + {py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-v{0.25} + {py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-latest # Huey - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-2 + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-v{2.0} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-latest # Loguru - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-loguru-v{0.5,0.6,0.7} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-loguru-v{0.5} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-loguru-latest # OpenTelemetry (OTel) {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-opentelemetry @@ -365,37 +369,34 @@ deps = graphene-latest: graphene # gRPC - grpc-v1.40: grpcio-tools>=1.40.0,<1.41.0 - grpc-v1.44: grpcio-tools>=1.44.0,<1.45.0 - grpc-v1.48: grpcio-tools>=1.48.0,<1.49.0 - grpc-v1.54: grpcio-tools>=1.54.0,<1.55.0 - grpc-v1.56: grpcio-tools>=1.56.0,<1.57.0 - grpc-v1.58: grpcio-tools>=1.58.0,<1.59.0 - grpc-v1.59: grpcio-tools>=1.59.0,<1.60.0 grpc: protobuf grpc: mypy-protobuf grpc: types-protobuf grpc: pytest-asyncio + grpc-v1.21: grpcio-tools~=1.21.0 + grpc-v1.30: grpcio-tools~=1.30.0 + grpc-v1.40: grpcio-tools~=1.40.0 + grpc-v1.50: grpcio-tools~=1.50.0 + grpc-latest: grpcio-tools # HTTPX httpx: pytest-httpx httpx: anyio<4.0.0 # thats a dep of httpx - httpx-v0.16: httpx>=0.16,<0.17 - httpx-v0.17: httpx>=0.17,<0.18 - httpx-v0.18: httpx>=0.18,<0.19 - httpx-v0.19: httpx>=0.19,<0.20 - httpx-v0.20: httpx>=0.20,<0.21 - httpx-v0.21: httpx>=0.21,<0.22 - httpx-v0.22: httpx>=0.22,<0.23 - httpx-v0.23: httpx>=0.23,<0.24 + httpx-v0.16: httpx~=0.16.0 + httpx-v0.18: httpx~=0.18.0 + httpx-v0.20: httpx~=0.20.0 + httpx-v0.22: httpx~=0.22.0 + httpx-v0.24: httpx~=0.24.0 + httpx-v0.25: httpx~=0.25.0 + httpx-latest: httpx # Huey - huey-2: huey>=2.0 + huey-v2.0: huey~=2.0.0 + huey-latest: huey # Loguru - loguru-v0.5: loguru>=0.5.0,<0.6.0 - loguru-v0.6: loguru>=0.6.0,<0.7.0 - loguru-v0.7: loguru>=0.7.0,<0.8.0 + loguru-v0.5: loguru~=0.5.0 + loguru-latest: loguru # OpenTelemetry (OTel) opentelemetry: opentelemetry-distro From c036f4ee8e3a24bcdc201cf620d8403088ae49a0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Fri, 17 Nov 2023 12:31:03 +0100 Subject: [PATCH 15/53] wip --- .../test-integration-rediscluster.yml | 2 +- tox.ini | 71 +++++++++++-------- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test-integration-rediscluster.yml b/.github/workflows/test-integration-rediscluster.yml index 73ed5c1733..b4b7597921 100644 --- a/.github/workflows/test-integration-rediscluster.yml +++ b/.github/workflows/test-integration-rediscluster.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9"] + python-version: ["3.7","3.8"] # 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 diff --git a/tox.ini b/tox.ini index b97f754341..a20a731ece 100644 --- a/tox.ini +++ b/tox.ini @@ -150,21 +150,30 @@ envlist = {py2.7,py3.6}-pymongo-v{3.1} {py2.7,py3.6,py3.7,py3.8,py3.9}-pymongo-v{3.12} {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-pymongo-v{4.0} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pymongo-v{4.1,4.2} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pymongo-v{4.3,4.6} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pymongo-latest # Pyramid - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-pyramid-v{1.6,1.7,1.8,1.9,1.10} - {py3.12}-pyramid-v{1.10} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-pyramid-v{1.6} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pyramid-v{1.10} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pyramid-v{2.0} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-pyramid-latest # Quart - {py3.7,py3.8,py3.9,py3.10,py3.11}-quart-v{0.16,0.17,0.18} + {py3.7,py3.8,py3.9,py3.10,py3.11}-quart-v{0.16} {py3.8,py3.9,py3.10,py3.11,py3.12}-quart-v{0.19} + {py3.8,py3.9,py3.10,py3.11,py3.12}-quart-latest # Redis - {py2.7,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis + {py2.7}-redis-v{0,1,2} + {py2.7,py3.7,py3.8}-redis-v{3} + {py3.7,py3.8,py3.9,py3.10,py3.11}-redis-v{4} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-v{5} + {py2.7,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-latest # Redis Cluster - {py2.7,py3.7,py3.8,py3.9}-rediscluster-v{1,2.1.0,2} + {py2.7,py3.7,py3.8}-rediscluster-v{1,2} + # no -latest, not developed anymore # Requests {py2.7,py3.8,py3.9,py3.10,py3.11,py3.12}-requests @@ -406,19 +415,19 @@ deps = # PyMongo (MongoDB) pymongo: mockupdb - pymongo-v3.1: pymongo>=3.1,<3.2 - pymongo-v3.12: pymongo>=3.12,<4.0 - pymongo-v4.0: pymongo>=4.0,<4.1 - pymongo-v4.1: pymongo>=4.1,<4.2 - pymongo-v4.2: pymongo>=4.2,<4.3 + pymongo-v3.1: pymongo~=3.1.0 + pymongo-v3.13: pymongo~=3.13.0 + pymongo-v4.0: pymongo~=4.0.0 + pymongo-v4.3: pymongo~=4.3.0 + pymongo-v4.6: pymongo~=4.6.0 + pymongo-latest: pymongo # Pyramid pyramid: Werkzeug<2.1.0 - pyramid-v1.6: pyramid>=1.6,<1.7 - pyramid-v1.7: pyramid>=1.7,<1.8 - pyramid-v1.8: pyramid>=1.8,<1.9 - pyramid-v1.9: pyramid>=1.9,<1.10 - pyramid-v1.10: pyramid>=1.10,<1.11 + pyramid-v1.6: pyramid~=1.6.0 + pyramid-v1.10: pyramid~=1.10.0 + pyramid-v2.0: pyramid~=2.0.0 + pyramid-latest: pyramid # Quart quart: quart-auth @@ -427,28 +436,28 @@ deps = quart-v0.16: jinja2<3.1.0 quart-v0.16: Werkzeug<2.1.0 quart-v0.16: hypercorn<0.15.0 - quart-v0.16: quart>=0.16.1,<0.17.0 - quart-v0.17: Werkzeug<3.0.0 - quart-v0.17: blinker<1.6 - quart-v0.17: hypercorn<0.15.0 - quart-v0.17: quart>=0.17.0,<0.18.0 - quart-v0.18: Werkzeug<3.0.0 - quart-v0.18: quart>=0.18.0,<0.19.0 - quart-v0.18: hypercorn<0.15.0 + quart-v0.16: quart~=0.16.0 quart-v0.19: Werkzeug>=3.0.0 - quart-v0.19: quart>=0.19.0,<0.20.0 - - # Requests - requests: requests>=2.0 + quart-v0.19: quart~=0.19.0 + quart-latest: quart # Redis redis: fakeredis!=1.7.4 {py3.7,py3.8,py3.9,py3.10,py3.11}-redis: pytest-asyncio + redis-v0: redis~=0.6 + redis-v1: redis~=1.0 + redis-v2: redis~=2.0 + redis-v3: redis~=3.0 + redis-v4: redis~=4.0 + redis-v5: redis~=5.0 + redis-latest: redis # Redis Cluster - rediscluster-v1: redis-py-cluster>=1.0.0,<2.0.0 - rediscluster-v2.1.0: redis-py-cluster>=2.0.0,<2.1.1 - rediscluster-v2: redis-py-cluster>=2.1.1,<3.0.0 + rediscluster-v1: redis-py-cluster~=1.0 + rediscluster-v2: redis-py-cluster~=2.0 + + # Requests + requests: requests>=2.0 # RQ (Redis Queue) # https://github.com/jamesls/fakeredis/issues/245 From b0485c40a38a0fcc3837d23aac5d81513e1fbd33 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Fri, 17 Nov 2023 13:52:25 +0100 Subject: [PATCH 16/53] wip --- tox.ini | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/tox.ini b/tox.ini index a20a731ece..079df460cf 100644 --- a/tox.ini +++ b/tox.ini @@ -165,7 +165,6 @@ envlist = {py3.8,py3.9,py3.10,py3.11,py3.12}-quart-latest # Redis - {py2.7}-redis-v{0,1,2} {py2.7,py3.7,py3.8}-redis-v{3} {py3.7,py3.8,py3.9,py3.10,py3.11}-redis-v{4} {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-v{5} @@ -179,9 +178,10 @@ envlist = {py2.7,py3.8,py3.9,py3.10,py3.11,py3.12}-requests # RQ (Redis Queue) - {py2.7,py3.5,py3.6}-rq-v{0.6,0.7,0.8,0.9,0.10,0.11} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.12,0.13,1.0,1.1,1.2,1.3} - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.4,1.5} + {py2.7,py3.5,py3.6}-rq-v{0.6} + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.13,1.0} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.5,1.10,1.15} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-latest # Sanic {py3.5,py3.6,py3.7}-sanic-v{0.8,18} @@ -444,9 +444,6 @@ deps = # Redis redis: fakeredis!=1.7.4 {py3.7,py3.8,py3.9,py3.10,py3.11}-redis: pytest-asyncio - redis-v0: redis~=0.6 - redis-v1: redis~=1.0 - redis-v2: redis~=2.0 redis-v3: redis~=3.0 redis-v4: redis~=4.0 redis-v5: redis~=5.0 @@ -461,24 +458,16 @@ deps = # RQ (Redis Queue) # https://github.com/jamesls/fakeredis/issues/245 - rq-v{0.6,0.7,0.8,0.9,0.10,0.11,0.12}: fakeredis<1.0 - rq-v{0.6,0.7,0.8,0.9,0.10,0.11,0.12}: redis<3.2.2 - rq-v{0.13,1.0,1.1,1.2,1.3,1.4,1.5}: fakeredis>=1.0,<1.7.4 - - rq-v0.6: rq>=0.6,<0.7 - rq-v0.7: rq>=0.7,<0.8 - rq-v0.8: rq>=0.8,<0.9 - rq-v0.9: rq>=0.9,<0.10 - rq-v0.10: rq>=0.10,<0.11 - rq-v0.11: rq>=0.11,<0.12 - rq-v0.12: rq>=0.12,<0.13 - rq-v0.13: rq>=0.13,<0.14 - rq-v1.0: rq>=1.0,<1.1 - rq-v1.1: rq>=1.1,<1.2 - rq-v1.2: rq>=1.2,<1.3 - rq-v1.3: rq>=1.3,<1.4 - rq-v1.4: rq>=1.4,<1.5 - rq-v1.5: rq>=1.5,<1.6 + rq-v{0.6}: fakeredis<1.0 + rq-v{0.6}: redis<3.2.2 + rq-v{0.13,1.0,1.5,1.10,1.15}: fakeredis>=1.0,<1.7.4 + rq-v0.6: rq~=0.6.0 + rq-v0.13: rq~=0.13.0 + rq-v1.0: rq~=1.0.0 + rq-v1.5: rq~=1.5.0 + rq-v1.10: rq~=1.10.0 + rq-v1.15: rq~=1.15.0 + rq-latest: rq # Sanic sanic-v0.8: sanic>=0.8,<0.9 From aabb1721147e3073a0b613f604f0b4c195e1d6cd Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 11:14:40 +0100 Subject: [PATCH 17/53] wip --- tox.ini | 90 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/tox.ini b/tox.ini index 079df460cf..9fbc864846 100644 --- a/tox.ini +++ b/tox.ini @@ -184,33 +184,42 @@ envlist = {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-latest # Sanic - {py3.5,py3.6,py3.7}-sanic-v{0.8,18} - {py3.6,py3.7}-sanic-v{19} + {py3.5,py3.6,py3.7}-sanic-v{0.8} {py3.6,py3.7,py3.8}-sanic-v{20} - {py3.7,py3.8,py3.9,py3.10,py3.11}-sanic-v{21} {py3.7,py3.8,py3.9,py3.10,py3.11}-sanic-v{22} + {py3.7,py3.8,py3.9,py3.10,py3.11}-sanic-v{23} {py3.8,py3.9,py3.10,py3.11}-sanic-latest # Starlette - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-v{0.20,0.22,0.24,0.26,0.28} + {py3.7,py3.8,py3.9,py3.10}-starlette-v{0.19} + {py3.7,py3.8,py3.9,py3.10,py3.11}-starlette-v{0.20,0.24,0.28} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-v{0.32} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-latest # Starlite - {py3.8,py3.9,py3.10,py3.11}-starlite + {py3.8,py3.9,py3.10,py3.11}-starlite-v{1.51} + # 1.51.14 is the last starlite version; the project continues as litestar # SQL Alchemy - {py2.7,py3.7,py3.8,py3.9,py3.10,py3.11}-sqlalchemy-v{1.2,1.3,1.4} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-sqlalchemy-v{2.0} + {py2.7,py3.7,py3.8,py3.9}-sqlalchemy-v{1.2,1.4} + {py3.7,py3.8,py3.9,py3.10,py3.11}-sqlalchemy-v{2.0} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-sqlalchemy-latest # Strawberry - {py3.8,py3.9,py3.10,py3.11,py3.12}-strawberry + {py3.8,py3.9,py3.10,py3.11}-strawberry-v{0.209} + {py3.8,py3.9,py3.10,py3.11,py3.12}-strawberry-latest # Tornado {py3.7,py3.8,py3.9}-tornado-v{5} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-tornado-v{6} + {py3.8,py3.9,py3.10,py3.11,py3.12}-tornado-v{6} + {py3.8,py3.9,py3.10,py3.11,py3.12}-tornado-latest # Trytond - {py3.5,py3.6,py3.7,py3.8,py3.9}-trytond-v{4.6,5.0,5.2} - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-trytond-v{5.4} + {py3.5,py3.6}-trytond-v{4} + {py3.6,py3.7,py3.8}-trytond-v{5} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-trytond-v{6} + {py3.8,py3.9,py3.10,py3.11,py3.12}-trytond-v{7} + {py3.8,py3.9,py3.10,py3.11,py3.12}-trytond-latest [testenv] deps = @@ -470,27 +479,17 @@ deps = rq-latest: rq # Sanic - sanic-v0.8: sanic>=0.8,<0.9 - sanic-v18: sanic>=18.0,<19.0 - sanic-v19: sanic>=19.0,<20.0 - sanic-v20: sanic>=20.0,<21.0 - sanic-v21: sanic>=21.0,<22.0 - sanic-v22: sanic>=22.0,<22.9.0 - - # Sanic is not using semver, so here we check the current latest version of Sanic. When this test breaks, we should - # determine whether it is because we need to fix something in our integration, or whether Sanic has simply dropped - # support for an older Python version. If Sanic has dropped support for an older python version, we should add a new - # line above to test for the newest Sanic version still supporting the old Python version, and we should update the - # line below so we test the latest Sanic version only using the Python versions that are supported. - sanic-latest: sanic>=23.6 - sanic: websockets<11.0 sanic: aiohttp - sanic-v21: sanic_testing<22 sanic-v22: sanic_testing<22.9.0 sanic-latest: sanic_testing>=23.6 {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 {py3.5}-sanic: ujson<4 + sanic-v0.8: sanic~=0.8.0 + sanic-v20: sanic~=20.0.0 + sanic-v22: sanic~=22.0.0 + sanic-v23: sanic~=23.0.0 + sanic-latest: sanic # Starlette starlette: pytest-asyncio @@ -499,11 +498,12 @@ deps = starlette: httpx starlette: anyio<4.0.0 # thats a dep of httpx starlette: jinja2 - starlette-v0.20: starlette>=0.20.0,<0.21.0 - starlette-v0.22: starlette>=0.22.0,<0.23.0 - starlette-v0.24: starlette>=0.24.0,<0.25.0 - starlette-v0.26: starlette>=0.26.0,<0.27.0 - starlette-v0.28: starlette>=0.28.0,<0.29.0 + starlette-v0.19: starlette~=0.19.0 + starlette-v0.20: starlette~=0.20.0 + starlette-v0.24: starlette~=0.24.0 + starlette-v0.28: starlette~=0.28.0 + starlette-v0.32: starlette~=0.32.0 + starlette-latest: starlette # Starlite starlite: pytest-asyncio @@ -511,32 +511,34 @@ deps = starlite: requests starlite: cryptography starlite: pydantic<2.0.0 - starlite: starlite {py3.8,py3.9}-starlite: typing-extensions==4.5.0 # this is used by pydantic, which is used by starlite. When the problem is fixed in here or pydantic, this can be removed + starlite-v{1.51}: starlite~=1.51.0 # SQLAlchemy - sqlalchemy-v1.2: sqlalchemy>=1.2,<1.3 - sqlalchemy-v1.3: sqlalchemy>=1.3,<1.4 - sqlalchemy-v1.4: sqlalchemy>=1.4,<2.0 - sqlalchemy-v2.0: sqlalchemy>=2.0,<2.1 + sqlalchemy-v1.2: sqlalchemy~=1.2.0 + sqlalchemy-v1.4: sqlalchemy~=1.4.0 + sqlalchemy-v2.0: sqlalchemy~=2.0.0 + sqlalchemy-latest: sqlalchemy # Strawberry - strawberry: strawberry-graphql[fastapi,flask] strawberry: fastapi strawberry: flask strawberry: httpx + strawberry-v0.209: strawberry-graphql[fastapi,flask]~=0.209.0 + strawberry-latest: strawberry-graphql[fastapi,flask] # Tornado - tornado-v5: tornado>=5,<6 - tornado-v6: tornado>=6.0a1 + tornado-v5: tornado~=5.0 + tornado-v6: tornado~=6.0 + tornado-latest: tornado # Trytond - trytond-v5.4: trytond>=5.4,<5.5 - trytond-v5.2: trytond>=5.2,<5.3 - trytond-v5.0: trytond>=5.0,<5.1 - trytond-v4.6: trytond>=4.6,<4.7 + trytond-v4: trytond~=4.0.0 + trytond-v5: trytond~=5.0.0 + trytond-v6: trytond~=6.0.0 + trytond-v7: trytond~=7.0.0 - trytond-v{4.6,4.8,5.0,5.2,5.4}: werkzeug<2.0 + trytond-v{4,5}: werkzeug<2.0 setenv = PYTHONDONTWRITEBYTECODE=1 From 8c2b02d877a4efb7143d1abdc5e473fe09aadd7e Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 11:16:15 +0100 Subject: [PATCH 18/53] fix --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 9fbc864846..5378831299 100644 --- a/tox.ini +++ b/tox.ini @@ -533,10 +533,10 @@ deps = tornado-latest: tornado # Trytond - trytond-v4: trytond~=4.0.0 - trytond-v5: trytond~=5.0.0 - trytond-v6: trytond~=6.0.0 - trytond-v7: trytond~=7.0.0 + trytond-v4: trytond~=4.0 + trytond-v5: trytond~=5.0 + trytond-v6: trytond~=6.0 + trytond-v7: trytond~=7.0 trytond-v{4,5}: werkzeug<2.0 From 5dcbca2a011b5c39ecde8926c63e7cf719fb8eb9 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 13:58:23 +0100 Subject: [PATCH 19/53] fix --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5378831299..2b0361cf52 100644 --- a/tox.ini +++ b/tox.ini @@ -538,7 +538,7 @@ deps = trytond-v6: trytond~=6.0 trytond-v7: trytond~=7.0 - trytond-v{4,5}: werkzeug<2.0 + trytond-v{4,5,6,7}: werkzeug<2.0 setenv = PYTHONDONTWRITEBYTECODE=1 From 21e28536cd1664352e68f96188a1989cb3f9ee18 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 14:47:29 +0100 Subject: [PATCH 20/53] simplify --- scripts/runtox.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/runtox.sh b/scripts/runtox.sh index 31be9bfb4b..3b53269620 100755 --- a/scripts/runtox.sh +++ b/scripts/runtox.sh @@ -18,10 +18,4 @@ searchstring="$1" export TOX_PARALLEL_NO_SPINNER=1 ENV="$($TOXPATH -l | grep "$searchstring" | tr $'\n' ',')" -# Run the common 2.7 suite without the -p flag, otherwise we hit an encoding -# issue in tox. -if [ "$ENV" = py2.7-common, ] || [ "$ENV" = py2.7-gevent, ]; then - exec $TOXPATH -vv -e "$ENV" -- "${@:2}" -else - exec $TOXPATH -vv -e "$ENV" -- "${@:2}" -fi +exec $TOXPATH -vv -e "$ENV" -- "${@:2}" From 4686a630f61866e9270ee87c6dcd407642dd2f48 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 15:02:21 +0100 Subject: [PATCH 21/53] fix huey test --- tests/integrations/huey/test_huey.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integrations/huey/test_huey.py b/tests/integrations/huey/test_huey.py index 29e4d37027..0bebd91b19 100644 --- a/tests/integrations/huey/test_huey.py +++ b/tests/integrations/huey/test_huey.py @@ -3,11 +3,16 @@ from sentry_sdk import start_transaction from sentry_sdk.integrations.huey import HueyIntegration +from sentry_sdk.utils import parse_version +from huey import __version__ as HUEY_VERSION from huey.api import MemoryHuey, Result from huey.exceptions import RetryTask +HUEY_VERSION = parse_version(HUEY_VERSION) + + @pytest.fixture def init_huey(sentry_init): def inner(): @@ -119,6 +124,7 @@ def retry_task(context): @pytest.mark.parametrize("lock_name", ["lock.a", "lock.b"], ids=["locked", "unlocked"]) +@pytest.mark.skipif(HUEY_VERSION < (2, 5), reason="is_locked was added in 2.5") def test_task_lock(capture_events, init_huey, lock_name): huey = init_huey() From a4e3620ef4ff30c59f0f3f8c60a4aa35e9671e87 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 15:24:42 +0100 Subject: [PATCH 22/53] more fixes --- tests/integrations/rq/test_rq.py | 7 ++++--- tox.ini | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index 270a92e295..5464b3de71 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -2,6 +2,7 @@ from fakeredis import FakeStrictRedis from sentry_sdk import configure_scope, start_transaction from sentry_sdk.integrations.rq import RqIntegration +from sentry_sdk.utils import parse_version import rq @@ -14,14 +15,14 @@ @pytest.fixture(autouse=True) def _patch_rq_get_server_version(monkeypatch): """ - Patch up RQ 1.5 to work with fakeredis. + Patch RQ lower than 1.5.1 to work with fakeredis. https://github.com/jamesls/fakeredis/issues/273 """ from distutils.version import StrictVersion - if tuple(map(int, rq.VERSION.split("."))) >= (1, 5): + if parse_version(rq.VERSION) <= (1, 5, 1): for k in ( "rq.job.Job.get_redis_server_version", "rq.worker.Worker.get_redis_server_version", @@ -249,7 +250,7 @@ def test_traces_sampler_gets_correct_values_in_sampling_context( @pytest.mark.skipif( - rq.__version__.split(".") < ["1", "5"], reason="At least rq-1.5 required" + parse_version(rq.__version__) < (1, 5), reason="At least rq-1.5 required" ) def test_job_with_retries(sentry_init, capture_events): sentry_init(integrations=[RqIntegration()]) diff --git a/tox.ini b/tox.ini index 2b0361cf52..479243107d 100644 --- a/tox.ini +++ b/tox.ini @@ -470,6 +470,7 @@ deps = rq-v{0.6}: fakeredis<1.0 rq-v{0.6}: redis<3.2.2 rq-v{0.13,1.0,1.5,1.10,1.15}: fakeredis>=1.0,<1.7.4 + rq-latest: fakeredis>=1.0,<1.7.4 rq-v0.6: rq~=0.6.0 rq-v0.13: rq~=0.13.0 rq-v1.0: rq~=1.0.0 From df831a79f743fc64669c8c9554cc6d34d0d99775 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 15:37:50 +0100 Subject: [PATCH 23/53] fixes --- tox.ini | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 479243107d..f8286cd144 100644 --- a/tox.ini +++ b/tox.ini @@ -101,8 +101,9 @@ envlist = {py3.8,py3.9,py3.10,py3.11,py3.12}-fastapi-latest # Flask - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-v{0,0.11,1} - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} + {py2.7,py3.5}-flask-v{0,0.11} + {py2.7,py3.5,py3.6,py3.7,py3.8}-flask-v{1} + {py3.8,py3.9,py3.10,py3.11,py3.12}-flask-v{2} {py3.10,py3.11,py3.12}-flask-v{3} {py3.10,py3.11,py3.12}-flask-latest @@ -193,8 +194,8 @@ envlist = # Starlette {py3.7,py3.8,py3.9,py3.10}-starlette-v{0.19} {py3.7,py3.8,py3.9,py3.10,py3.11}-starlette-v{0.20,0.24,0.28} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-v{0.32} - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-latest + {py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-v{0.32} + {py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-latest # Starlite {py3.8,py3.9,py3.10,py3.11}-starlite-v{1.51} @@ -538,6 +539,7 @@ deps = trytond-v5: trytond~=5.0 trytond-v6: trytond~=6.0 trytond-v7: trytond~=7.0 + trytond-latest: trytond trytond-v{4,5,6,7}: werkzeug<2.0 From 446f0de615f2c702d6f270ee2fb87e2d6283eb39 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 15:49:21 +0100 Subject: [PATCH 24/53] fix --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index f8286cd144..4989e69ec5 100644 --- a/tox.ini +++ b/tox.ini @@ -358,6 +358,7 @@ deps = # Flask flask: flask-login flask-v{0.11,0,1,2.0}: Werkzeug<2.1.0 + flask-v{0.11,0,1,2.0}: markupsafe<2.1.0 flask-v{3}: Werkzeug flask-v0.11: Flask~=0.11.0 flask-v0: Flask~=0.11 @@ -542,6 +543,7 @@ deps = trytond-latest: trytond trytond-v{4,5,6,7}: werkzeug<2.0 + trytond-latest: werkzeug<2.0 setenv = PYTHONDONTWRITEBYTECODE=1 From 740e31508b399487d0a81154c72da4b2bd248f0f Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Mon, 20 Nov 2023 15:53:59 +0100 Subject: [PATCH 25/53] fix sanic --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 4989e69ec5..2843e6e14b 100644 --- a/tox.ini +++ b/tox.ini @@ -489,9 +489,9 @@ deps = {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 {py3.5}-sanic: ujson<4 sanic-v0.8: sanic~=0.8.0 - sanic-v20: sanic~=20.0.0 - sanic-v22: sanic~=22.0.0 - sanic-v23: sanic~=23.0.0 + sanic-v20: sanic~=20.0 + sanic-v22: sanic~=22.0 + sanic-v23: sanic~=23.0 sanic-latest: sanic # Starlette From bd308c2b4d3d9abaedf1e14ba7b932b7763744a0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 10:21:55 +0100 Subject: [PATCH 26/53] try to fix httpx --- tox.ini | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 2843e6e14b..affa7528c6 100644 --- a/tox.ini +++ b/tox.ini @@ -400,8 +400,15 @@ deps = grpc-latest: grpcio-tools # HTTPX - httpx: pytest-httpx - httpx: anyio<4.0.0 # thats a dep of httpx + httpx-v0.16: pytest-httpx~=0.10.0 + httpx-v0.18: pytest-httpx~=0.12.0 + httpx-v0.20: pytest-httpx~=0.14.0 + httpx-v0.22: pytest-httpx~=0.19.0 + httpx-v0.24: pytest-httpx~=0.22.0 + httpx-v0.25: pytest-httpx~=0.25.0 + httpx-v0.25: pytest~=7.0.0 + # anyio is a dep of httpx + httpx: anyio<4.0.0 httpx-v0.16: httpx~=0.16.0 httpx-v0.18: httpx~=0.18.0 httpx-v0.20: httpx~=0.20.0 From 7eb34f603499a7038ab980a807a8e6ec5ede2653 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 12:55:52 +0100 Subject: [PATCH 27/53] remove unnecessary pin --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index b130a69bab..ff289c1054 100644 --- a/tox.ini +++ b/tox.ini @@ -414,7 +414,6 @@ deps = httpx-v0.22: pytest-httpx~=0.19.0 httpx-v0.24: pytest-httpx~=0.22.0 httpx-v0.25: pytest-httpx~=0.25.0 - httpx-v0.25: pytest~=7.0.0 # anyio is a dep of httpx httpx: anyio<4.0.0 httpx-v0.16: httpx~=0.16.0 From 6e5dba46427a2706134cbc0afe70ba62ae768134 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 13:40:44 +0100 Subject: [PATCH 28/53] fix httpx --- .../split-tox-gh-actions.py | 17 +++++++++-------- tox.ini | 15 +++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index ea187475db..4192260fd1 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -108,14 +108,15 @@ def write_yaml_file( out = "" py27_test_part = False for template_line in template: - if template_line.strip() == "{{ strategy_matrix }}": + template_line = template_line.strip() + if template_line == "{{ strategy_matrix }}": m = MATRIX_DEFINITION m = m.replace("{{ framework }}", current_framework).replace( "{{ python-version }}", ",".join([f'"{v}"' for v in py_versions]) ) out += m - elif template_line.strip() == "{{ services }}": + elif template_line == "{{ services }}": if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SERVICES, "r") lines = [ @@ -128,32 +129,32 @@ def write_yaml_file( out += "".join(lines) f.close() - elif template_line.strip() == "{{ setup_postgres }}": + elif template_line == "{{ setup_postgres }}": if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SETUP_DB, "r") out += "".join(f.readlines()) - elif template_line.strip() == "{{ aws_credentials }}": + elif template_line == "{{ aws_credentials }}": if current_framework in FRAMEWORKS_NEEDING_AWS: f = open(TEMPLATE_FILE_AWS_CREDENTIALS, "r") out += "".join(f.readlines()) - elif template_line.strip() == "{{ additional_uses }}": + elif template_line == "{{ additional_uses }}": if current_framework in FRAMEWORKS_NEEDING_CLICKHOUSE: out += ADDITIONAL_USES_CLICKHOUSE - elif template_line.strip() == "{{ check_needs }}": + elif template_line == "{{ check_needs }}": if py27_supported: out += CHECK_NEEDS_PY27 else: out += CHECK_NEEDS - elif template_line.strip() == "{{ check_py27 }}": + elif template_line == "{{ check_py27 }}": if py27_supported: out += CHECK_PY27 else: - if template_line.strip() == "test-py27:": + if template_line == "test-py27:": py27_test_part = True out += template_line.replace("{{ framework }}", current_framework) diff --git a/tox.ini b/tox.ini index ff289c1054..f257911d42 100644 --- a/tox.ini +++ b/tox.ini @@ -408,18 +408,21 @@ deps = grpc-latest: grpcio-tools # HTTPX - httpx-v0.16: pytest-httpx~=0.10.0 - httpx-v0.18: pytest-httpx~=0.12.0 - httpx-v0.20: pytest-httpx~=0.14.0 - httpx-v0.22: pytest-httpx~=0.19.0 - httpx-v0.24: pytest-httpx~=0.22.0 - httpx-v0.25: pytest-httpx~=0.25.0 + httpx-v0.16: pytest-httpx==0.10.0 + httpx-v0.18: pytest-httpx==0.12.0 + httpx-v0.20: pytest-httpx==0.14.0 + httpx-v0.22: pytest-httpx==0.19.0 + httpx-v0.23: pytest-httpx==0.21.0 + httpx-v0.24: pytest-httpx==0.22.0 + httpx-v0.25: pytest-httpx==0.25.0 + httpx: pytest-httpx # anyio is a dep of httpx httpx: anyio<4.0.0 httpx-v0.16: httpx~=0.16.0 httpx-v0.18: httpx~=0.18.0 httpx-v0.20: httpx~=0.20.0 httpx-v0.22: httpx~=0.22.0 + httpx-v0.23: httpx~=0.23.0 httpx-v0.24: httpx~=0.24.0 httpx-v0.25: httpx~=0.25.0 httpx-latest: httpx From 01d49ed37d722c40e70565848e7656200a4afbb0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 14:00:27 +0100 Subject: [PATCH 29/53] fix beam tests --- tests/integrations/beam/test_beam.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/integrations/beam/test_beam.py b/tests/integrations/beam/test_beam.py index 570cd0ab1b..7926521ca6 100644 --- a/tests/integrations/beam/test_beam.py +++ b/tests/integrations/beam/test_beam.py @@ -12,9 +12,14 @@ from apache_beam.typehints.trivial_inference import instance_to_type from apache_beam.typehints.decorators import getcallargs_forhints from apache_beam.transforms.core import DoFn, ParDo, _DoFnParam, CallableWrapperDoFn -from apache_beam.runners.common import DoFnInvoker, OutputProcessor, DoFnContext +from apache_beam.runners.common import DoFnInvoker, DoFnContext from apache_beam.utils.windowed_value import WindowedValue +try: + from apache_beam.runners.common import OutputHandler +except ImportError: + from apache_beam.runners.common import OutputProcessor as OutputHandler + def foo(): return True @@ -149,9 +154,16 @@ def test_monkey_patch_signature(f, args, kwargs): pass -class _OutputProcessor(OutputProcessor): +class _OutputHandler(OutputHandler): def process_outputs( self, windowed_input_element, results, watermark_estimator=None + ): + self.handle_process_outputs( + windowed_input_element, results, watermark_estimator + ) + + def handle_process_outputs( + self, windowed_input_element, results, watermark_estimator=None ): print(windowed_input_element) try: @@ -168,7 +180,7 @@ def inner(fn): # Little hack to avoid having to run the whole pipeline. pardo = ParDo(fn) signature = pardo._signature - output_processor = _OutputProcessor() + output_processor = _OutputHandler() return DoFnInvoker.create_invoker( signature, output_processor, DoFnContext("test") ) From 5f4a2f7bf33c311316d4827ab47ada345a350917 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 14:10:20 +0100 Subject: [PATCH 30/53] fix sanic --- tests/integrations/sanic/test_sanic.py | 2 ++ tox.ini | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py index 1f6717a923..d98e0f9b14 100644 --- a/tests/integrations/sanic/test_sanic.py +++ b/tests/integrations/sanic/test_sanic.py @@ -40,6 +40,8 @@ def new_test_client(self): Sanic.test_client = property(new_test_client) + Sanic.test_mode = True + if SANIC_VERSION >= (20, 12) and SANIC_VERSION < (22, 6): # Some builds (20.12.0 intruduced and 22.6.0 removed again) have a feature where the instance is stored in an internal class # registry for later retrieval, and so add register=False to disable that diff --git a/tox.ini b/tox.ini index f257911d42..cd87d21604 100644 --- a/tox.ini +++ b/tox.ini @@ -501,8 +501,9 @@ deps = # Sanic sanic: websockets<11.0 sanic: aiohttp - sanic-v22: sanic_testing<22.9.0 - sanic-latest: sanic_testing>=23.6 + sanic-v{0.8,20,22}: sanic_testing<22.9.0 + sanic-v{23}: sanic_testing + sanic-latest: sanic_testing {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 {py3.5}-sanic: ujson<4 sanic-v0.8: sanic~=0.8.0 From d571e1ea887ead246d37de8299b90590b270682a Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 14:29:27 +0100 Subject: [PATCH 31/53] more httpx fixes --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index cd87d21604..e3f34934ad 100644 --- a/tox.ini +++ b/tox.ini @@ -130,8 +130,8 @@ envlist = {py3.6,py3.7,py3.8,py3.9}-httpx-v{0.16,0.18} {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-v{0.20,0.22} {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-v{0.23,0.24} - {py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-v{0.25} - {py3.8,py3.9,py3.10,py3.11,py3.12}-httpx-latest + {py3.9,py3.10,py3.11,py3.12}-httpx-v{0.25} + {py3.9,py3.10,py3.11,py3.12}-httpx-latest # Huey {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-v{2.0} From 77ee7223573fc93309887076af6820ee35f2531a Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 14:30:59 +0100 Subject: [PATCH 32/53] fix split tox actions --- .../split-tox-gh-actions.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index 4192260fd1..ea187475db 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -108,15 +108,14 @@ def write_yaml_file( out = "" py27_test_part = False for template_line in template: - template_line = template_line.strip() - if template_line == "{{ strategy_matrix }}": + if template_line.strip() == "{{ strategy_matrix }}": m = MATRIX_DEFINITION m = m.replace("{{ framework }}", current_framework).replace( "{{ python-version }}", ",".join([f'"{v}"' for v in py_versions]) ) out += m - elif template_line == "{{ services }}": + elif template_line.strip() == "{{ services }}": if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SERVICES, "r") lines = [ @@ -129,32 +128,32 @@ def write_yaml_file( out += "".join(lines) f.close() - elif template_line == "{{ setup_postgres }}": + elif template_line.strip() == "{{ setup_postgres }}": if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SETUP_DB, "r") out += "".join(f.readlines()) - elif template_line == "{{ aws_credentials }}": + elif template_line.strip() == "{{ aws_credentials }}": if current_framework in FRAMEWORKS_NEEDING_AWS: f = open(TEMPLATE_FILE_AWS_CREDENTIALS, "r") out += "".join(f.readlines()) - elif template_line == "{{ additional_uses }}": + elif template_line.strip() == "{{ additional_uses }}": if current_framework in FRAMEWORKS_NEEDING_CLICKHOUSE: out += ADDITIONAL_USES_CLICKHOUSE - elif template_line == "{{ check_needs }}": + elif template_line.strip() == "{{ check_needs }}": if py27_supported: out += CHECK_NEEDS_PY27 else: out += CHECK_NEEDS - elif template_line == "{{ check_py27 }}": + elif template_line.strip() == "{{ check_py27 }}": if py27_supported: out += CHECK_PY27 else: - if template_line == "test-py27:": + if template_line.strip() == "test-py27:": py27_test_part = True out += template_line.replace("{{ framework }}", current_framework) From 5401b3162320695b84ec3a1a4208e2988006e3e1 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 17:10:33 +0100 Subject: [PATCH 33/53] possibly fix sanic --- tests/integrations/sanic/test_sanic.py | 75 ++++++++++++++++++-------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py index d98e0f9b14..ec2e4aba64 100644 --- a/tests/integrations/sanic/test_sanic.py +++ b/tests/integrations/sanic/test_sanic.py @@ -1,7 +1,8 @@ +import asyncio +import contextlib import os -import sys import random -import asyncio +import sys from unittest.mock import Mock import pytest @@ -13,6 +14,12 @@ from sanic import Sanic, request, response, __version__ as SANIC_VERSION_RAW from sanic.response import HTTPResponse from sanic.exceptions import SanicException +from sanic_testing import TestManager + +try: + from sanic_testing.reusable import ReusableClient +except ImportError: + ReusableClient = None from sentry_sdk._types import TYPE_CHECKING @@ -40,38 +47,51 @@ def new_test_client(self): Sanic.test_client = property(new_test_client) - Sanic.test_mode = True - if SANIC_VERSION >= (20, 12) and SANIC_VERSION < (22, 6): # Some builds (20.12.0 intruduced and 22.6.0 removed again) have a feature where the instance is stored in an internal class # registry for later retrieval, and so add register=False to disable that - app = Sanic("Test", register=False) + sanic_app = Sanic("Test", register=False) else: - app = Sanic("Test") + sanic_app = Sanic("Test") - @app.route("/message") + TestManager(sanic_app) + + @sanic_app.route("/message") def hi(request): capture_message("hi") return response.text("ok") - @app.route("/message/") + @sanic_app.route("/message/") def hi_with_id(request, message_id): capture_message("hi with id") return response.text("ok with id") - @app.route("/500") + @sanic_app.route("/500") def fivehundred(_): 1 / 0 - return app + return sanic_app + + +def get_client(app): + @contextlib.contextmanager + def simple_client(app): + yield app.test_client + + if ReusableClient is not None: + return ReusableClient(app) + else: + return simple_client(app) def test_request_data(sentry_init, app, capture_events): sentry_init(integrations=[SanicIntegration()]) events = capture_events() - request, response = app.test_client.get("/message?foo=bar") - assert response.status == 200 + client = get_client(app) + with client: + _, response = client.get("/message?foo=bar") + assert response.status == 200 (event,) = events assert event["transaction"] == "hi" @@ -108,8 +128,10 @@ def test_transaction_name( sentry_init(integrations=[SanicIntegration()]) events = capture_events() - request, response = app.test_client.get(url) - assert response.status == 200 + client = get_client(app) + with client: + _, response = client.get(url) + assert response.status == 200 (event,) = events assert event["transaction"] == expected_transaction @@ -124,8 +146,10 @@ def test_errors(sentry_init, app, capture_events): def myerror(request): raise ValueError("oh no") - request, response = app.test_client.get("/error") - assert response.status == 500 + client = get_client(app) + with client: + _, response = client.get("/error") + assert response.status == 500 (event,) = events assert event["transaction"] == "myerror" @@ -147,8 +171,10 @@ def test_bad_request_not_captured(sentry_init, app, capture_events): def index(request): raise SanicException("...", status_code=400) - request, response = app.test_client.get("/") - assert response.status == 400 + client = get_client(app) + with client: + _, response = client.get("/") + assert response.status == 400 assert not events @@ -165,8 +191,10 @@ def myerror(request): def myhandler(request, exception): 1 / 0 - request, response = app.test_client.get("/error") - assert response.status == 500 + client = get_client(app) + with client: + _, response = client.get("/error") + assert response.status == 500 event1, event2 = events @@ -196,7 +224,6 @@ def test_concurrency(sentry_init, app): because that's the only way we could reproduce leakage with such a low amount of concurrent tasks. """ - sentry_init(integrations=[SanicIntegration()]) @app.route("/context-check/") @@ -382,8 +409,10 @@ def test_transactions(test_config, sentry_init, app, capture_events): events = capture_events() # Make request to the desired URL - _, response = app.test_client.get(test_config.url) - assert response.status == test_config.expected_status + client = get_client(app) + with client: + _, response = client.get(test_config.url) + assert response.status == test_config.expected_status # Extract the transaction events by inspecting the event types. We should at most have 1 transaction event. transaction_events = [ From 000620834ca3eac2398d88e9cc1e5ddfba378f93 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 21 Nov 2023 17:37:35 +0100 Subject: [PATCH 34/53] trying something --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e3f34934ad..d1b6f5142a 100644 --- a/tox.ini +++ b/tox.ini @@ -501,7 +501,7 @@ deps = # Sanic sanic: websockets<11.0 sanic: aiohttp - sanic-v{0.8,20,22}: sanic_testing<22.9.0 + sanic-v{0.8,20,22}: sanic_testing sanic-v{23}: sanic_testing sanic-latest: sanic_testing {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 From ebd6a301a2bf127b53c3d4a99c6906f33a124c4b Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 10:14:09 +0100 Subject: [PATCH 35/53] sanic compat --- tests/integrations/sanic/test_sanic.py | 33 +++++++++++++++----------- tox.ini | 3 +-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py index ec2e4aba64..b338a5e6fb 100644 --- a/tests/integrations/sanic/test_sanic.py +++ b/tests/integrations/sanic/test_sanic.py @@ -14,7 +14,11 @@ from sanic import Sanic, request, response, __version__ as SANIC_VERSION_RAW from sanic.response import HTTPResponse from sanic.exceptions import SanicException -from sanic_testing import TestManager + +try: + from sanic_testing import TestManager +except ImportError: + TestManager = None try: from sanic_testing.reusable import ReusableClient @@ -54,7 +58,8 @@ def new_test_client(self): else: sanic_app = Sanic("Test") - TestManager(sanic_app) + if TestManager is not None: + TestManager(sanic_app) @sanic_app.route("/message") def hi(request): @@ -88,8 +93,8 @@ def test_request_data(sentry_init, app, capture_events): sentry_init(integrations=[SanicIntegration()]) events = capture_events() - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get("/message?foo=bar") assert response.status == 200 @@ -128,8 +133,8 @@ def test_transaction_name( sentry_init(integrations=[SanicIntegration()]) events = capture_events() - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get(url) assert response.status == 200 @@ -146,8 +151,8 @@ def test_errors(sentry_init, app, capture_events): def myerror(request): raise ValueError("oh no") - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get("/error") assert response.status == 500 @@ -171,8 +176,8 @@ def test_bad_request_not_captured(sentry_init, app, capture_events): def index(request): raise SanicException("...", status_code=400) - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get("/") assert response.status == 400 @@ -191,8 +196,8 @@ def myerror(request): def myhandler(request, exception): 1 / 0 - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get("/error") assert response.status == 500 @@ -409,8 +414,8 @@ def test_transactions(test_config, sentry_init, app, capture_events): events = capture_events() # Make request to the desired URL - client = get_client(app) - with client: + c = get_client(app) + with c as client: _, response = client.get(test_config.url) assert response.status == test_config.expected_status diff --git a/tox.ini b/tox.ini index d1b6f5142a..e557ccc47b 100644 --- a/tox.ini +++ b/tox.ini @@ -501,8 +501,7 @@ deps = # Sanic sanic: websockets<11.0 sanic: aiohttp - sanic-v{0.8,20,22}: sanic_testing - sanic-v{23}: sanic_testing + sanic-v{22,23}: sanic_testing sanic-latest: sanic_testing {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 {py3.5}-sanic: ujson<4 From 2878df5736742bc1c07862a5ed93a5d33a04330b Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 10:48:13 +0100 Subject: [PATCH 36/53] fix trytond --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e557ccc47b..a0c3ed4fde 100644 --- a/tox.ini +++ b/tox.ini @@ -559,7 +559,8 @@ deps = trytond-v7: trytond~=7.0 trytond-latest: trytond - trytond-v{4,5,6,7}: werkzeug<2.0 + trytond-v{4}: werkzeug<1.0 + trytond-v{5,6,7}: werkzeug<2.0 trytond-latest: werkzeug<2.0 setenv = From adba1e0c0fe862d7ea581c7937cbc3864ee76930 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 11:11:59 +0100 Subject: [PATCH 37/53] fix some rq --- tests/integrations/rq/test_rq.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index 5464b3de71..6689442fad 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -27,7 +27,10 @@ def _patch_rq_get_server_version(monkeypatch): "rq.job.Job.get_redis_server_version", "rq.worker.Worker.get_redis_server_version", ): - monkeypatch.setattr(k, lambda _: StrictVersion("4.0.0")) + try: + monkeypatch.setattr(k, lambda _: StrictVersion("4.0.0")) + except AttributeError: + pass def crashing_job(foo): From bce65785f80e05c94608d9f89be611868dababec Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 11:46:09 +0100 Subject: [PATCH 38/53] fix boto, skip rq test for now --- tests/integrations/rq/test_rq.py | 2 ++ tox.ini | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index 6689442fad..b711a52afc 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -30,6 +30,7 @@ def _patch_rq_get_server_version(monkeypatch): try: monkeypatch.setattr(k, lambda _: StrictVersion("4.0.0")) except AttributeError: + # old RQ Job/Worker doesn't have a get_redis_server_version attr pass @@ -79,6 +80,7 @@ def test_basic(sentry_init, capture_events): def test_transport_shutdown(sentry_init, capture_events_forksafe): sentry_init(integrations=[RqIntegration()]) + assert False events = capture_events_forksafe() diff --git a/tox.ini b/tox.ini index a0c3ed4fde..ff0c739a71 100644 --- a/tox.ini +++ b/tox.ini @@ -50,8 +50,9 @@ envlist = # Boto3 {py2.7,py3.6,py3.7}-boto3-v{1.12} - {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-v{1.29} - {py3.7,py3.8,3.9,3.10,3.11,3.12}-boto3-latest + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-boto3-v{1.21} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-boto3-v{1.29} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-boto3-latest # Bottle {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-bottle-v{0.12} @@ -181,7 +182,8 @@ envlist = # RQ (Redis Queue) {py2.7,py3.5,py3.6}-rq-v{0.6} {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.13,1.0} - {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.5,1.10,1.15} + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-rq-v{1.5,1.10} + {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.15} {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-latest # Sanic From 98d73ece0499f7136176303e000185117868b226 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 12:21:17 +0100 Subject: [PATCH 39/53] fix rq --- tests/integrations/rq/test_rq.py | 1 - tox.ini | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index b711a52afc..b0d71e8f7d 100644 --- a/tests/integrations/rq/test_rq.py +++ b/tests/integrations/rq/test_rq.py @@ -80,7 +80,6 @@ def test_basic(sentry_init, capture_events): def test_transport_shutdown(sentry_init, capture_events_forksafe): sentry_init(integrations=[RqIntegration()]) - assert False events = capture_events_forksafe() diff --git a/tox.ini b/tox.ini index ff0c739a71..75c4b12e3d 100644 --- a/tox.ini +++ b/tox.ini @@ -490,8 +490,9 @@ deps = # https://github.com/jamesls/fakeredis/issues/245 rq-v{0.6}: fakeredis<1.0 rq-v{0.6}: redis<3.2.2 - rq-v{0.13,1.0,1.5,1.10,1.15}: fakeredis>=1.0,<1.7.4 - rq-latest: fakeredis>=1.0,<1.7.4 + rq-v{0.13,1.0,1.5,1.10}: fakeredis>=1.0,<1.7.4 + rq-v{1.15}: fakeredis + rq-latest: fakeredis rq-v0.6: rq~=0.6.0 rq-v0.13: rq~=0.13.0 rq-v1.0: rq~=1.0.0 From a17cb7835bf7f2a0531bf6ae0d828d881e4f3442 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 13:50:40 +0100 Subject: [PATCH 40/53] run latest as an extra step --- .github/workflows/test-common.yml | 1 + .../workflows/test-integration-aiohttp.yml | 46 +++++++++++++ .../workflows/test-integration-ariadne.yml | 46 +++++++++++++ .github/workflows/test-integration-arq.yml | 46 +++++++++++++ .github/workflows/test-integration-asgi.yml | 1 + .../workflows/test-integration-asyncpg.yml | 67 +++++++++++++++++++ .../workflows/test-integration-aws_lambda.yml | 1 + .github/workflows/test-integration-beam.yml | 46 +++++++++++++ .github/workflows/test-integration-boto3.yml | 46 +++++++++++++ .github/workflows/test-integration-bottle.yml | 46 +++++++++++++ .github/workflows/test-integration-celery.yml | 46 +++++++++++++ .../workflows/test-integration-chalice.yml | 46 +++++++++++++ .../test-integration-clickhouse_driver.yml | 48 +++++++++++++ ...est-integration-cloud_resource_context.yml | 1 + .github/workflows/test-integration-django.yml | 1 + .github/workflows/test-integration-falcon.yml | 46 +++++++++++++ .../workflows/test-integration-fastapi.yml | 46 +++++++++++++ .github/workflows/test-integration-flask.yml | 46 +++++++++++++ .github/workflows/test-integration-gcp.yml | 1 + .github/workflows/test-integration-gevent.yml | 1 + .github/workflows/test-integration-gql.yml | 46 +++++++++++++ .../workflows/test-integration-graphene.yml | 46 +++++++++++++ .github/workflows/test-integration-grpc.yml | 46 +++++++++++++ .github/workflows/test-integration-httpx.yml | 46 +++++++++++++ .github/workflows/test-integration-huey.yml | 46 +++++++++++++ .github/workflows/test-integration-loguru.yml | 46 +++++++++++++ .../test-integration-opentelemetry.yml | 1 + .../workflows/test-integration-pure_eval.yml | 1 + .../workflows/test-integration-pymongo.yml | 46 +++++++++++++ .../workflows/test-integration-pyramid.yml | 46 +++++++++++++ .github/workflows/test-integration-quart.yml | 46 +++++++++++++ .github/workflows/test-integration-redis.yml | 46 +++++++++++++ .../test-integration-rediscluster.yml | 1 + .../workflows/test-integration-requests.yml | 1 + .github/workflows/test-integration-rq.yml | 46 +++++++++++++ .github/workflows/test-integration-sanic.yml | 46 +++++++++++++ .../workflows/test-integration-sqlalchemy.yml | 46 +++++++++++++ .../workflows/test-integration-starlette.yml | 46 +++++++++++++ .../workflows/test-integration-starlite.yml | 1 + .../workflows/test-integration-strawberry.yml | 46 +++++++++++++ .../workflows/test-integration-tornado.yml | 46 +++++++++++++ .../workflows/test-integration-trytond.yml | 46 +++++++++++++ scripts/runtox.sh | 4 +- .../ci-yaml-test-latest-snippet.txt | 39 +++++++++++ scripts/split-tox-gh-actions/ci-yaml.txt | 2 + .../split-tox-gh-actions.py | 29 +++++++- tox.ini | 4 +- 47 files changed, 1487 insertions(+), 6 deletions(-) create mode 100644 scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt diff --git a/.github/workflows/test-common.yml b/.github/workflows/test-common.yml index 7204c5d7d7..5dfcac9b47 100644 --- a/.github/workflows/test-common.yml +++ b/.github/workflows/test-common.yml @@ -98,6 +98,7 @@ jobs: coverage combine .coverage* && coverage xml -i + check_required_tests: name: All common tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index f70d652f2e..10de517821 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test aiohttp + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All aiohttp tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-ariadne.yml b/.github/workflows/test-integration-ariadne.yml index 38e0d8271b..aa46620181 100644 --- a/.github/workflows/test-integration-ariadne.yml +++ b/.github/workflows/test-integration-ariadne.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: ariadne, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test ariadne + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All ariadne tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-arq.yml b/.github/workflows/test-integration-arq.yml index 614e53f390..90403a2dca 100644 --- a/.github/workflows/test-integration-arq.yml +++ b/.github/workflows/test-integration-arq.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: arq, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test arq + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-arq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All arq tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-asgi.yml b/.github/workflows/test-integration-asgi.yml index 9a29398fc2..cd3215d444 100644 --- a/.github/workflows/test-integration-asgi.yml +++ b/.github/workflows/test-integration-asgi.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All asgi tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index 4b2ed26671..7d07d68bc6 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -91,6 +91,73 @@ jobs: files: coverage.xml + test-latest: + name: asyncpg, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: sentry + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + # Maps tcp port 5432 on service container to the host + ports: + - 5432:5432 + env: + SENTRY_PYTHON_TEST_POSTGRES_USER: postgres + SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry + SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test + SENTRY_PYTHON_TEST_POSTGRES_HOST: localhost + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + psql postgresql://postgres:sentry@localhost:5432 -c "create database ${SENTRY_PYTHON_TEST_POSTGRES_NAME};" || true + psql postgresql://postgres:sentry@localhost:5432 -c "grant all privileges on database ${SENTRY_PYTHON_TEST_POSTGRES_NAME} to ${SENTRY_PYTHON_TEST_POSTGRES_USER};" || true + + - name: Test asyncpg + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All asyncpg tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-aws_lambda.yml b/.github/workflows/test-integration-aws_lambda.yml index 385bb4b13a..032e5aafed 100644 --- a/.github/workflows/test-integration-aws_lambda.yml +++ b/.github/workflows/test-integration-aws_lambda.yml @@ -72,6 +72,7 @@ jobs: files: coverage.xml + check_required_tests: name: All aws_lambda tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 3f9f3ee27a..57b0784f4f 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test beam + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-beam-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All beam tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index d18c716761..1bfe51531c 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test boto3 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All boto3 tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-bottle.yml b/.github/workflows/test-integration-bottle.yml index 5bbdcaac53..ec5039f64a 100644 --- a/.github/workflows/test-integration-bottle.yml +++ b/.github/workflows/test-integration-bottle.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test bottle + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All bottle tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-celery.yml b/.github/workflows/test-integration-celery.yml index 71623f0e1e..98c3165fa7 100644 --- a/.github/workflows/test-integration-celery.yml +++ b/.github/workflows/test-integration-celery.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test celery + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-celery-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All celery tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 37085a40c3..2270ca2871 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: chalice, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test chalice + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All chalice tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-clickhouse_driver.yml b/.github/workflows/test-integration-clickhouse_driver.yml index 30561ab5a1..3dc54fe53d 100644 --- a/.github/workflows/test-integration-clickhouse_driver.yml +++ b/.github/workflows/test-integration-clickhouse_driver.yml @@ -72,6 +72,54 @@ jobs: files: coverage.xml + test-latest: + name: clickhouse_driver, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - uses: getsentry/action-clickhouse-in-ci@v1 + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test clickhouse_driver + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-clickhouse_driver-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All clickhouse_driver tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-cloud_resource_context.yml b/.github/workflows/test-integration-cloud_resource_context.yml index f6140d823c..45908f2084 100644 --- a/.github/workflows/test-integration-cloud_resource_context.yml +++ b/.github/workflows/test-integration-cloud_resource_context.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All cloud_resource_context tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 819fb70f1a..3bbbbd2e03 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -138,6 +138,7 @@ jobs: coverage combine .coverage* && coverage xml -i + check_required_tests: name: All django tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 09d8ff8d80..8f58f110c0 100644 --- a/.github/workflows/test-integration-falcon.yml +++ b/.github/workflows/test-integration-falcon.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: falcon, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test falcon + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All falcon tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 0a330b1401..514dbdf9e4 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: fastapi, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test fastapi + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All fastapi tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index d716df171d..b9fcf137c5 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: flask, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test flask + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-flask-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All flask tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-gcp.yml b/.github/workflows/test-integration-gcp.yml index c6eb4adcc8..81e03cdbf1 100644 --- a/.github/workflows/test-integration-gcp.yml +++ b/.github/workflows/test-integration-gcp.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All gcp tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-gevent.yml b/.github/workflows/test-integration-gevent.yml index d879f5c2f5..22589b381a 100644 --- a/.github/workflows/test-integration-gevent.yml +++ b/.github/workflows/test-integration-gevent.yml @@ -98,6 +98,7 @@ jobs: coverage combine .coverage* && coverage xml -i + check_required_tests: name: All gevent tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-gql.yml b/.github/workflows/test-integration-gql.yml index 9ebd5a16b7..495c22c73e 100644 --- a/.github/workflows/test-integration-gql.yml +++ b/.github/workflows/test-integration-gql.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: gql, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test gql + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-gql-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All gql tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-graphene.yml b/.github/workflows/test-integration-graphene.yml index 5236731eb0..00ab18eee2 100644 --- a/.github/workflows/test-integration-graphene.yml +++ b/.github/workflows/test-integration-graphene.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: graphene, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test graphene + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-graphene-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All graphene tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-grpc.yml b/.github/workflows/test-integration-grpc.yml index 0e4f48d423..8a2a145ad1 100644 --- a/.github/workflows/test-integration-grpc.yml +++ b/.github/workflows/test-integration-grpc.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: grpc, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test grpc + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-grpc-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All grpc tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-httpx.yml b/.github/workflows/test-integration-httpx.yml index 3c67d2370c..ef5e9a343c 100644 --- a/.github/workflows/test-integration-httpx.yml +++ b/.github/workflows/test-integration-httpx.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: httpx, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test httpx + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All httpx tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-huey.yml b/.github/workflows/test-integration-huey.yml index db6c5fcbc4..67442865f0 100644 --- a/.github/workflows/test-integration-huey.yml +++ b/.github/workflows/test-integration-huey.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: huey, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test huey + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-huey-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All huey tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-loguru.yml b/.github/workflows/test-integration-loguru.yml index 885b1534f4..8eced1dcaf 100644 --- a/.github/workflows/test-integration-loguru.yml +++ b/.github/workflows/test-integration-loguru.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: loguru, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test loguru + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-loguru-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All loguru tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-opentelemetry.yml b/.github/workflows/test-integration-opentelemetry.yml index 5e2722ed49..b63ffba5aa 100644 --- a/.github/workflows/test-integration-opentelemetry.yml +++ b/.github/workflows/test-integration-opentelemetry.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All opentelemetry tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-pure_eval.yml b/.github/workflows/test-integration-pure_eval.yml index 30b5f8cc1b..30cc627604 100644 --- a/.github/workflows/test-integration-pure_eval.yml +++ b/.github/workflows/test-integration-pure_eval.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All pure_eval tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-pymongo.yml b/.github/workflows/test-integration-pymongo.yml index 2a3d7697f2..4cb7f5bc5a 100644 --- a/.github/workflows/test-integration-pymongo.yml +++ b/.github/workflows/test-integration-pymongo.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: pymongo, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test pymongo + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-pymongo-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All pymongo tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-pyramid.yml b/.github/workflows/test-integration-pyramid.yml index 7a4b327b3f..2d12ad62fc 100644 --- a/.github/workflows/test-integration-pyramid.yml +++ b/.github/workflows/test-integration-pyramid.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: pyramid, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test pyramid + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All pyramid tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-quart.yml b/.github/workflows/test-integration-quart.yml index 838683cf9c..f23c244dea 100644 --- a/.github/workflows/test-integration-quart.yml +++ b/.github/workflows/test-integration-quart.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: quart, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test quart + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-quart-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All quart tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-redis.yml b/.github/workflows/test-integration-redis.yml index 54ad9abe2a..a8d96aab64 100644 --- a/.github/workflows/test-integration-redis.yml +++ b/.github/workflows/test-integration-redis.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: redis, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test redis + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-redis-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All redis tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-rediscluster.yml b/.github/workflows/test-integration-rediscluster.yml index b4b7597921..051ee20842 100644 --- a/.github/workflows/test-integration-rediscluster.yml +++ b/.github/workflows/test-integration-rediscluster.yml @@ -98,6 +98,7 @@ jobs: coverage combine .coverage* && coverage xml -i + check_required_tests: name: All rediscluster tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-requests.yml b/.github/workflows/test-integration-requests.yml index bc8e4a990c..900d7f9848 100644 --- a/.github/workflows/test-integration-requests.yml +++ b/.github/workflows/test-integration-requests.yml @@ -98,6 +98,7 @@ jobs: coverage combine .coverage* && coverage xml -i + check_required_tests: name: All requests tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-rq.yml b/.github/workflows/test-integration-rq.yml index b0812c36e6..b99840415a 100644 --- a/.github/workflows/test-integration-rq.yml +++ b/.github/workflows/test-integration-rq.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: rq, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test rq + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All rq tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-sanic.yml b/.github/workflows/test-integration-sanic.yml index 27ca05eb6a..c5f3d5525d 100644 --- a/.github/workflows/test-integration-sanic.yml +++ b/.github/workflows/test-integration-sanic.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: sanic, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test sanic + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All sanic tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-sqlalchemy.yml b/.github/workflows/test-integration-sqlalchemy.yml index 70cbb7ff79..b009fad90b 100644 --- a/.github/workflows/test-integration-sqlalchemy.yml +++ b/.github/workflows/test-integration-sqlalchemy.yml @@ -98,6 +98,52 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: sqlalchemy, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test sqlalchemy + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All sqlalchemy tests passed or skipped needs: [test, test-py27] diff --git a/.github/workflows/test-integration-starlette.yml b/.github/workflows/test-integration-starlette.yml index ad3e269075..b919857a5b 100644 --- a/.github/workflows/test-integration-starlette.yml +++ b/.github/workflows/test-integration-starlette.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: starlette, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test starlette + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All starlette tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-starlite.yml b/.github/workflows/test-integration-starlite.yml index 01715e1c66..e0f9cbc75a 100644 --- a/.github/workflows/test-integration-starlite.yml +++ b/.github/workflows/test-integration-starlite.yml @@ -70,6 +70,7 @@ jobs: files: coverage.xml + check_required_tests: name: All starlite tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-strawberry.yml b/.github/workflows/test-integration-strawberry.yml index 16b42ec2a2..70f28217b3 100644 --- a/.github/workflows/test-integration-strawberry.yml +++ b/.github/workflows/test-integration-strawberry.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: strawberry, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test strawberry + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All strawberry tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-tornado.yml b/.github/workflows/test-integration-tornado.yml index c9ccec4f38..8d6d3f1d1d 100644 --- a/.github/workflows/test-integration-tornado.yml +++ b/.github/workflows/test-integration-tornado.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: tornado, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test tornado + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All tornado tests passed or skipped needs: test diff --git a/.github/workflows/test-integration-trytond.yml b/.github/workflows/test-integration-trytond.yml index 137cec7ef4..2e17588809 100644 --- a/.github/workflows/test-integration-trytond.yml +++ b/.github/workflows/test-integration-trytond.yml @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: trytond, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + + - name: Test trytond + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + check_required_tests: name: All trytond tests passed or skipped needs: test diff --git a/scripts/runtox.sh b/scripts/runtox.sh index 3b53269620..b6e11991db 100755 --- a/scripts/runtox.sh +++ b/scripts/runtox.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Usage: sh scripts/runtox.sh py3.7 -# Runs all environments with substring py3.7 and the given arguments for pytest +# Usage: sh scripts/runtox.sh py3.12 +# Runs all environments with substring py3.12 and the given arguments for pytest set -ex diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt new file mode 100644 index 0000000000..5b5da8d613 --- /dev/null +++ b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt @@ -0,0 +1,39 @@ + test-latest: + name: {{ framework }}, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 +{{ strategy_matrix }} +{{ services }} + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} +{{ additional_uses }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + {{ setup_postgres }} + + - name: Test {{ framework }} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-{{ framework }}-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml diff --git a/scripts/split-tox-gh-actions/ci-yaml.txt b/scripts/split-tox-gh-actions/ci-yaml.txt index 90bd5c61ce..a5ba0ef725 100644 --- a/scripts/split-tox-gh-actions/ci-yaml.txt +++ b/scripts/split-tox-gh-actions/ci-yaml.txt @@ -28,6 +28,8 @@ jobs: {{ test_py27 }} +{{ test_latest }} + check_required_tests: name: All {{ framework }} tests passed or skipped {{ check_needs }} diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index ea187475db..a78c450805 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -31,6 +31,7 @@ TEMPLATE_FILE_AWS_CREDENTIALS = TEMPLATE_DIR / "ci-yaml-aws-credentials.txt" TEMPLATE_SNIPPET_TEST = TEMPLATE_DIR / "ci-yaml-test-snippet.txt" TEMPLATE_SNIPPET_TEST_PY27 = TEMPLATE_DIR / "ci-yaml-test-py27-snippet.txt" +TEMPLATE_SNIPPET_TEST_LATEST = TEMPLATE_DIR / "ci-yaml-test-latest-snippet.txt" FRAMEWORKS_NEEDING_POSTGRES = [ "django", @@ -81,6 +82,7 @@ def write_yaml_file( template, current_framework, python_versions, + should_test_latest, ): """Write the YAML configuration file for one framework to disk.""" py_versions = [py.replace("py", "") for py in python_versions] @@ -105,6 +107,19 @@ def write_yaml_file( else: template.pop(test_py27_loc) + test_latest_loc = template.index("{{ test_latest }}\n") + if should_test_latest: + f = open(TEMPLATE_SNIPPET_TEST_LATEST, "r") + test_latest_snippet = f.readlines() + template = ( + template[:test_latest_loc] + + test_latest_snippet + + template[test_latest_loc + 1 :] + ) + f.close() + else: + template.pop(test_latest_loc) + out = "" py27_test_part = False for template_line in template: @@ -199,6 +214,7 @@ def main(fail_on_changes): lines = [x for x in config["tox"]["envlist"].split("\n") if len(x) > 0] python_versions = defaultdict(list) + should_test_latest = defaultdict(lambda: False) print("Parse tox.ini envlist") @@ -213,9 +229,10 @@ def main(fail_on_changes): try: # parse tox environment definition try: - (raw_python_versions, framework, _) = line.split("-") + (raw_python_versions, framework, framework_versions) = line.split("-") except ValueError: (raw_python_versions, framework) = line.split("-") + framework_versions = [] # collect python versions to test the framework in for python_version in ( @@ -224,11 +241,19 @@ def main(fail_on_changes): if python_version not in python_versions[framework]: python_versions[framework].append(python_version) + if "latest" in framework_versions: + should_test_latest[framework] = True + except ValueError: print(f"ERROR reading line {line}") for framework in python_versions: - write_yaml_file(template, framework, python_versions[framework]) + write_yaml_file( + template, + framework, + python_versions[framework], + should_test_latest[framework], + ) if fail_on_changes: new_hash = get_yaml_files_hash() diff --git a/tox.ini b/tox.ini index 75c4b12e3d..e81bebd3f4 100644 --- a/tox.ini +++ b/tox.ini @@ -183,8 +183,8 @@ envlist = {py2.7,py3.5,py3.6}-rq-v{0.6} {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-v{0.13,1.0} {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-rq-v{1.5,1.10} - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.15} - {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-latest + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-v{1.15} + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-rq-latest # Sanic {py3.5,py3.6,py3.7}-sanic-v{0.8} From 29800f98b827d9eaa71c921228d77d4e2eeff6e4 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 14:07:44 +0100 Subject: [PATCH 41/53] wip --- .../workflows/test-integration-aiohttp.yml | 2 +- .../workflows/test-integration-ariadne.yml | 2 +- .github/workflows/test-integration-arq.yml | 2 +- .../workflows/test-integration-asyncpg.yml | 4 +- .github/workflows/test-integration-beam.yml | 4 +- .github/workflows/test-integration-boto3.yml | 2 +- .github/workflows/test-integration-bottle.yml | 2 +- .github/workflows/test-integration-celery.yml | 2 +- .../workflows/test-integration-chalice.yml | 4 +- .../test-integration-clickhouse_driver.yml | 2 +- .github/workflows/test-integration-django.yml | 66 +++++++++++++++++++ .github/workflows/test-integration-falcon.yml | 2 +- .../workflows/test-integration-fastapi.yml | 4 +- .github/workflows/test-integration-flask.yml | 2 +- .../workflows/test-integration-graphene.yml | 2 +- .github/workflows/test-integration-grpc.yml | 4 +- .github/workflows/test-integration-httpx.yml | 2 +- .../workflows/test-integration-pymongo.yml | 2 +- .../workflows/test-integration-pyramid.yml | 2 +- .github/workflows/test-integration-quart.yml | 2 +- .github/workflows/test-integration-rq.yml | 2 +- .github/workflows/test-integration-sanic.yml | 2 +- .../workflows/test-integration-sqlalchemy.yml | 2 +- .../workflows/test-integration-starlette.yml | 2 +- .../workflows/test-integration-strawberry.yml | 2 +- .../workflows/test-integration-tornado.yml | 2 +- .../workflows/test-integration-trytond.yml | 2 +- .../ci-yaml-test-latest-snippet.txt | 2 +- .../split-tox-gh-actions.py | 38 +++++++---- tox.ini | 10 +-- 30 files changed, 130 insertions(+), 48 deletions(-) diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index 10de517821..d4bec274e3 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-ariadne.yml b/.github/workflows/test-integration-ariadne.yml index aa46620181..2db46c385b 100644 --- a/.github/workflows/test-integration-ariadne.yml +++ b/.github/workflows/test-integration-ariadne.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-arq.yml b/.github/workflows/test-integration-arq.yml index 90403a2dca..38fd8defcd 100644 --- a/.github/workflows/test-integration-arq.yml +++ b/.github/workflows/test-integration-arq.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index 7d07d68bc6..614b9758d4 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10"] # 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 @@ -99,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 57b0784f4f..4264224146 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.7"] # 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 @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index 1bfe51531c..209fbb409f 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -106,7 +106,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.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-bottle.yml b/.github/workflows/test-integration-bottle.yml index ec5039f64a..d24f6ee8ff 100644 --- a/.github/workflows/test-integration-bottle.yml +++ b/.github/workflows/test-integration-bottle.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.5","3.6","3.7","3.8","3.9"] # 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 diff --git a/.github/workflows/test-integration-celery.yml b/.github/workflows/test-integration-celery.yml index 98c3165fa7..e0fb38b524 100644 --- a/.github/workflows/test-integration-celery.yml +++ b/.github/workflows/test-integration-celery.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 2270ca2871..9361efa140 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10"] + python-version: ["3.6","3.7","3.8","3.9"] # 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 @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10"] + python-version: ["3.7","3.8","3.9","3.10"] # 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 diff --git a/.github/workflows/test-integration-clickhouse_driver.yml b/.github/workflows/test-integration-clickhouse_driver.yml index 3dc54fe53d..dc45a37c32 100644 --- a/.github/workflows/test-integration-clickhouse_driver.yml +++ b/.github/workflows/test-integration-clickhouse_driver.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 3bbbbd2e03..0274e35fe1 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -138,6 +138,72 @@ jobs: coverage combine .coverage* && coverage xml -i + test-latest: + name: django, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + python-version: ["3.10","3.11","3.12"] + # 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 + # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 + os: [ubuntu-20.04] + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: sentry + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + # Maps tcp port 5432 on service container to the host + ports: + - 5432:5432 + env: + SENTRY_PYTHON_TEST_POSTGRES_USER: postgres + SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry + SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test + SENTRY_PYTHON_TEST_POSTGRES_HOST: postgres + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Test Env + run: | + pip install coverage "tox>=3,<4" + psql postgresql://postgres:sentry@localhost:5432 -c "create database ${SENTRY_PYTHON_TEST_POSTGRES_NAME};" || true + psql postgresql://postgres:sentry@localhost:5432 -c "grant all privileges on database ${SENTRY_PYTHON_TEST_POSTGRES_NAME} to ${SENTRY_PYTHON_TEST_POSTGRES_USER};" || true + + - name: Test django + uses: nick-fields/retry@v2 + with: + timeout_minutes: 15 + max_attempts: 2 + retry_wait_seconds: 5 + shell: bash + command: | + set -x # print commands that are executed + coverage erase + + # Run tests + ./scripts/runtox.sh "py${{ matrix.python-version }}-django-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + coverage combine .coverage* && + coverage xml -i + + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml check_required_tests: name: All django tests passed or skipped diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 8f58f110c0..379bc6405f 100644 --- a/.github/workflows/test-integration-falcon.yml +++ b/.github/workflows/test-integration-falcon.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 514dbdf9e4..ee20bee368 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10"] # 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 @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index b9fcf137c5..cc9a46a980 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-graphene.yml b/.github/workflows/test-integration-graphene.yml index 00ab18eee2..35a7778b25 100644 --- a/.github/workflows/test-integration-graphene.yml +++ b/.github/workflows/test-integration-graphene.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-grpc.yml b/.github/workflows/test-integration-grpc.yml index 8a2a145ad1..27a5841a2c 100644 --- a/.github/workflows/test-integration-grpc.yml +++ b/.github/workflows/test-integration-grpc.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-httpx.yml b/.github/workflows/test-integration-httpx.yml index ef5e9a343c..0e99ebe190 100644 --- a/.github/workflows/test-integration-httpx.yml +++ b/.github/workflows/test-integration-httpx.yml @@ -78,7 +78,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.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-pymongo.yml b/.github/workflows/test-integration-pymongo.yml index 4cb7f5bc5a..02c39ef1ff 100644 --- a/.github/workflows/test-integration-pymongo.yml +++ b/.github/workflows/test-integration-pymongo.yml @@ -106,7 +106,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.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-pyramid.yml b/.github/workflows/test-integration-pyramid.yml index 2d12ad62fc..2393309f96 100644 --- a/.github/workflows/test-integration-pyramid.yml +++ b/.github/workflows/test-integration-pyramid.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","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"] # 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 diff --git a/.github/workflows/test-integration-quart.yml b/.github/workflows/test-integration-quart.yml index f23c244dea..13e3b21e17 100644 --- a/.github/workflows/test-integration-quart.yml +++ b/.github/workflows/test-integration-quart.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-rq.yml b/.github/workflows/test-integration-rq.yml index b99840415a..04bde9d22a 100644 --- a/.github/workflows/test-integration-rq.yml +++ b/.github/workflows/test-integration-rq.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-sanic.yml b/.github/workflows/test-integration-sanic.yml index c5f3d5525d..c9a7882696 100644 --- a/.github/workflows/test-integration-sanic.yml +++ b/.github/workflows/test-integration-sanic.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-sqlalchemy.yml b/.github/workflows/test-integration-sqlalchemy.yml index b009fad90b..3c8f652f3d 100644 --- a/.github/workflows/test-integration-sqlalchemy.yml +++ b/.github/workflows/test-integration-sqlalchemy.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-starlette.yml b/.github/workflows/test-integration-starlette.yml index b919857a5b..59532bbaab 100644 --- a/.github/workflows/test-integration-starlette.yml +++ b/.github/workflows/test-integration-starlette.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-strawberry.yml b/.github/workflows/test-integration-strawberry.yml index 70f28217b3..8e0aaef7a4 100644 --- a/.github/workflows/test-integration-strawberry.yml +++ b/.github/workflows/test-integration-strawberry.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11"] # 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 diff --git a/.github/workflows/test-integration-tornado.yml b/.github/workflows/test-integration-tornado.yml index 8d6d3f1d1d..db977519cf 100644 --- a/.github/workflows/test-integration-tornado.yml +++ b/.github/workflows/test-integration-tornado.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/.github/workflows/test-integration-trytond.yml b/.github/workflows/test-integration-trytond.yml index 2e17588809..4bbb56e76c 100644 --- a/.github/workflows/test-integration-trytond.yml +++ b/.github/workflows/test-integration-trytond.yml @@ -78,7 +78,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.10","3.11","3.12"] # 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 diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt index 5b5da8d613..6073db372a 100644 --- a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt +++ b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt @@ -2,7 +2,7 @@ name: {{ framework }}, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 -{{ strategy_matrix }} +{{ strategy_matrix_latest }} {{ services }} steps: diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index a78c450805..98cc319156 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -82,11 +82,19 @@ def write_yaml_file( template, current_framework, python_versions, - should_test_latest, + python_versions_latest, ): + print(current_framework, "SHOULD TEST LATEST", python_versions_latest) """Write the YAML configuration file for one framework to disk.""" - py_versions = [py.replace("py", "") for py in python_versions] + py_versions = sorted( + [py.replace("py", "") for py in python_versions], + key=lambda v: tuple(map(int, v.split("."))), + ) py27_supported = "2.7" in py_versions + py_versions_latest = sorted( + [py.replace("py", "") for py in python_versions_latest], + key=lambda v: tuple(map(int, v.split("."))), + ) test_loc = template.index("{{ test }}\n") f = open(TEMPLATE_SNIPPET_TEST, "r") @@ -108,7 +116,7 @@ def write_yaml_file( template.pop(test_py27_loc) test_latest_loc = template.index("{{ test_latest }}\n") - if should_test_latest: + if python_versions_latest: f = open(TEMPLATE_SNIPPET_TEST_LATEST, "r") test_latest_snippet = f.readlines() template = ( @@ -130,6 +138,13 @@ def write_yaml_file( ) out += m + elif template_line.strip() == "{{ strategy_matrix_latest }}": + m = MATRIX_DEFINITION + m = m.replace("{{ framework }}", current_framework).replace( + "{{ python-version }}", ",".join([f'"{v}"' for v in py_versions_latest]) + ) + out += m + elif template_line.strip() == "{{ services }}": if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SERVICES, "r") @@ -213,8 +228,8 @@ def main(fail_on_changes): config.read(TOX_FILE) lines = [x for x in config["tox"]["envlist"].split("\n") if len(x) > 0] - python_versions = defaultdict(list) - should_test_latest = defaultdict(lambda: False) + python_versions = defaultdict(set) + python_versions_latest = defaultdict(set) print("Parse tox.ini envlist") @@ -235,14 +250,13 @@ def main(fail_on_changes): framework_versions = [] # collect python versions to test the framework in - for python_version in ( + raw_python_versions = set( raw_python_versions.replace("{", "").replace("}", "").split(",") - ): - if python_version not in python_versions[framework]: - python_versions[framework].append(python_version) - + ) if "latest" in framework_versions: - should_test_latest[framework] = True + python_versions_latest[framework] |= raw_python_versions + else: + python_versions[framework] |= raw_python_versions except ValueError: print(f"ERROR reading line {line}") @@ -252,7 +266,7 @@ def main(fail_on_changes): template, framework, python_versions[framework], - should_test_latest[framework], + python_versions_latest[framework], ) if fail_on_changes: diff --git a/tox.ini b/tox.ini index e81bebd3f4..8be394bdc7 100644 --- a/tox.ini +++ b/tox.ini @@ -56,7 +56,7 @@ envlist = # Bottle {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-bottle-v{0.12} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-latest + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-bottle-latest # Celery {py2.7}-celery-v{3} @@ -91,6 +91,7 @@ envlist = {py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{4.0,4.1,4.2} # - Django 5.x {py3.10,py3.11,py3.12}-django-v{5.0} + {py3.10,py3.11,py3.12}-django-latest # Falcon {py2.7,py3.5,py3.6,py3.7}-falcon-v{1,1.4,2} @@ -136,7 +137,7 @@ envlist = # Huey {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-v{2.0} - {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-latest + {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-latest # Loguru {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-loguru-v{0.5} @@ -170,7 +171,7 @@ envlist = {py2.7,py3.7,py3.8}-redis-v{3} {py3.7,py3.8,py3.9,py3.10,py3.11}-redis-v{4} {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-v{5} - {py2.7,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-latest + {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-redis-latest # Redis Cluster {py2.7,py3.7,py3.8}-rediscluster-v{1,2} @@ -343,7 +344,8 @@ deps = django-v4.1: Django~=4.1.0 django-v4.2: Django~=4.2.0 # TODO: change to final when available - django-v5.0: Django==5.0b1 + django-v5.0: Django==5.0rc1 + django-latest: Django # Falcon falcon-v1.4: falcon~=1.4.0 From abda88e6eaaacc36305ce28da38561c183282489 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 14:14:31 +0100 Subject: [PATCH 42/53] better test name --- .github/workflows/test-integration-aiohttp.yml | 2 +- .github/workflows/test-integration-ariadne.yml | 2 +- .github/workflows/test-integration-arq.yml | 2 +- .github/workflows/test-integration-asyncpg.yml | 2 +- .github/workflows/test-integration-beam.yml | 2 +- .github/workflows/test-integration-boto3.yml | 2 +- .github/workflows/test-integration-bottle.yml | 2 +- .github/workflows/test-integration-celery.yml | 2 +- .github/workflows/test-integration-chalice.yml | 2 +- .github/workflows/test-integration-clickhouse_driver.yml | 2 +- .github/workflows/test-integration-django.yml | 2 +- .github/workflows/test-integration-falcon.yml | 2 +- .github/workflows/test-integration-fastapi.yml | 2 +- .github/workflows/test-integration-flask.yml | 2 +- .github/workflows/test-integration-gql.yml | 2 +- .github/workflows/test-integration-graphene.yml | 2 +- .github/workflows/test-integration-grpc.yml | 2 +- .github/workflows/test-integration-httpx.yml | 2 +- .github/workflows/test-integration-huey.yml | 2 +- .github/workflows/test-integration-loguru.yml | 2 +- .github/workflows/test-integration-pymongo.yml | 2 +- .github/workflows/test-integration-pyramid.yml | 2 +- .github/workflows/test-integration-quart.yml | 2 +- .github/workflows/test-integration-redis.yml | 2 +- .github/workflows/test-integration-rq.yml | 2 +- .github/workflows/test-integration-sanic.yml | 2 +- .github/workflows/test-integration-sqlalchemy.yml | 2 +- .github/workflows/test-integration-starlette.yml | 2 +- .github/workflows/test-integration-strawberry.yml | 2 +- .github/workflows/test-integration-tornado.yml | 2 +- .github/workflows/test-integration-trytond.yml | 2 +- scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index d4bec274e3..43a01519f7 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: aiohttp, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: aiohttp latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-ariadne.yml b/.github/workflows/test-integration-ariadne.yml index 2db46c385b..923a935060 100644 --- a/.github/workflows/test-integration-ariadne.yml +++ b/.github/workflows/test-integration-ariadne.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: ariadne, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: ariadne latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-arq.yml b/.github/workflows/test-integration-arq.yml index 38fd8defcd..1c7e32bdbb 100644 --- a/.github/workflows/test-integration-arq.yml +++ b/.github/workflows/test-integration-arq.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: arq, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: arq latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index 614b9758d4..94a3434458 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -92,7 +92,7 @@ jobs: test-latest: - name: asyncpg, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: asyncpg latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index 4264224146..f0b9470baa 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: beam, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: beam latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index 209fbb409f..e0d9ecf151 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: boto3, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: boto3 latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-bottle.yml b/.github/workflows/test-integration-bottle.yml index d24f6ee8ff..0b7ffa483a 100644 --- a/.github/workflows/test-integration-bottle.yml +++ b/.github/workflows/test-integration-bottle.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: bottle, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: bottle latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-celery.yml b/.github/workflows/test-integration-celery.yml index e0fb38b524..e3437eeb44 100644 --- a/.github/workflows/test-integration-celery.yml +++ b/.github/workflows/test-integration-celery.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: celery, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: celery latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 9361efa140..74f43f5a2e 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: chalice, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: chalice latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-clickhouse_driver.yml b/.github/workflows/test-integration-clickhouse_driver.yml index dc45a37c32..6397db764b 100644 --- a/.github/workflows/test-integration-clickhouse_driver.yml +++ b/.github/workflows/test-integration-clickhouse_driver.yml @@ -73,7 +73,7 @@ jobs: test-latest: - name: clickhouse_driver, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: clickhouse_driver latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 0274e35fe1..521bea71af 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -139,7 +139,7 @@ jobs: coverage xml -i test-latest: - name: django, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: django latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 379bc6405f..173e1115fd 100644 --- a/.github/workflows/test-integration-falcon.yml +++ b/.github/workflows/test-integration-falcon.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: falcon, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: falcon latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index ee20bee368..3895921601 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: fastapi, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: fastapi latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index cc9a46a980..013f0a4dc6 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: flask, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: flask latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-gql.yml b/.github/workflows/test-integration-gql.yml index 495c22c73e..6806db6c49 100644 --- a/.github/workflows/test-integration-gql.yml +++ b/.github/workflows/test-integration-gql.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: gql, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: gql latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-graphene.yml b/.github/workflows/test-integration-graphene.yml index 35a7778b25..2d42284e7e 100644 --- a/.github/workflows/test-integration-graphene.yml +++ b/.github/workflows/test-integration-graphene.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: graphene, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: graphene latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-grpc.yml b/.github/workflows/test-integration-grpc.yml index 27a5841a2c..d3c140a08b 100644 --- a/.github/workflows/test-integration-grpc.yml +++ b/.github/workflows/test-integration-grpc.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: grpc, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: grpc latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-httpx.yml b/.github/workflows/test-integration-httpx.yml index 0e99ebe190..e61f6a6bff 100644 --- a/.github/workflows/test-integration-httpx.yml +++ b/.github/workflows/test-integration-httpx.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: httpx, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: httpx latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-huey.yml b/.github/workflows/test-integration-huey.yml index 67442865f0..6c9878af8c 100644 --- a/.github/workflows/test-integration-huey.yml +++ b/.github/workflows/test-integration-huey.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: huey, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: huey latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-loguru.yml b/.github/workflows/test-integration-loguru.yml index 8eced1dcaf..c007f5dbb8 100644 --- a/.github/workflows/test-integration-loguru.yml +++ b/.github/workflows/test-integration-loguru.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: loguru, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: loguru latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-pymongo.yml b/.github/workflows/test-integration-pymongo.yml index 02c39ef1ff..32939a4481 100644 --- a/.github/workflows/test-integration-pymongo.yml +++ b/.github/workflows/test-integration-pymongo.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: pymongo, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: pymongo latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-pyramid.yml b/.github/workflows/test-integration-pyramid.yml index 2393309f96..ec3c986e5b 100644 --- a/.github/workflows/test-integration-pyramid.yml +++ b/.github/workflows/test-integration-pyramid.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: pyramid, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: pyramid latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-quart.yml b/.github/workflows/test-integration-quart.yml index 13e3b21e17..3644417ca8 100644 --- a/.github/workflows/test-integration-quart.yml +++ b/.github/workflows/test-integration-quart.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: quart, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: quart latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-redis.yml b/.github/workflows/test-integration-redis.yml index a8d96aab64..87d26fd0ff 100644 --- a/.github/workflows/test-integration-redis.yml +++ b/.github/workflows/test-integration-redis.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: redis, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: redis latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-rq.yml b/.github/workflows/test-integration-rq.yml index 04bde9d22a..b51bf0c280 100644 --- a/.github/workflows/test-integration-rq.yml +++ b/.github/workflows/test-integration-rq.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: rq, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: rq latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-sanic.yml b/.github/workflows/test-integration-sanic.yml index c9a7882696..d84ca5d46d 100644 --- a/.github/workflows/test-integration-sanic.yml +++ b/.github/workflows/test-integration-sanic.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: sanic, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: sanic latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-sqlalchemy.yml b/.github/workflows/test-integration-sqlalchemy.yml index 3c8f652f3d..201e27fc5a 100644 --- a/.github/workflows/test-integration-sqlalchemy.yml +++ b/.github/workflows/test-integration-sqlalchemy.yml @@ -99,7 +99,7 @@ jobs: coverage xml -i test-latest: - name: sqlalchemy, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: sqlalchemy latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-starlette.yml b/.github/workflows/test-integration-starlette.yml index 59532bbaab..8ef5694354 100644 --- a/.github/workflows/test-integration-starlette.yml +++ b/.github/workflows/test-integration-starlette.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: starlette, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: starlette latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-strawberry.yml b/.github/workflows/test-integration-strawberry.yml index 8e0aaef7a4..aef4c907f0 100644 --- a/.github/workflows/test-integration-strawberry.yml +++ b/.github/workflows/test-integration-strawberry.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: strawberry, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: strawberry latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-tornado.yml b/.github/workflows/test-integration-tornado.yml index db977519cf..81fcbd70d8 100644 --- a/.github/workflows/test-integration-tornado.yml +++ b/.github/workflows/test-integration-tornado.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: tornado, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: tornado latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/.github/workflows/test-integration-trytond.yml b/.github/workflows/test-integration-trytond.yml index 4bbb56e76c..91623cd6bd 100644 --- a/.github/workflows/test-integration-trytond.yml +++ b/.github/workflows/test-integration-trytond.yml @@ -71,7 +71,7 @@ jobs: test-latest: - name: trytond, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: trytond latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt index 6073db372a..4a2aec033e 100644 --- a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt +++ b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt @@ -1,5 +1,5 @@ test-latest: - name: {{ framework }}, python ${{ matrix.python-version }}, ${{ matrix.os }} + name: {{ framework }} latest, python ${{ matrix.python-version }}, ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 30 {{ strategy_matrix_latest }} From bc5cab19e0f9eb363efb6687ee4ba69985657f3d Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 14:27:36 +0100 Subject: [PATCH 43/53] update django deps --- tox.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 8be394bdc7..602b18ebcd 100644 --- a/tox.ini +++ b/tox.ini @@ -320,19 +320,19 @@ deps = # Django django: psycopg2-binary - django: Werkzeug<2.1.0 django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: djangorestframework>=3.0.0,<4.0.0 - - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,.2,4.0,4.1,4.2,5.0}: pytest-asyncio - {py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-django-v{1.11,2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne]>2 - + django-v{1.11,2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne] + django-v{1.8,1.11,2.0,2.2,3.0,3.2}: Werkzeug<2.1.0 django-v{1.8,1.11,2.0}: pytest-django<4.0 - django-v{2.2,3.0,3.2}: pytest-django>=4.0 - django-v{2.2,3.0,3.2}: Werkzeug<2.0 + django-v{2.2,3.0,3.2,4.0,4.1,4.2,5.0}: pytest-django django-v{4.0,4.1,4.2,5.0}: djangorestframework django-v{4.0,4.1,4.2,5.0}: pytest-asyncio - django-v{4.0,4.1,4.2,5.0}: pytest-django django-v{4.0,4.1,4.2,5.0}: Werkzeug + django-latest: djangorestframework + django-latest: pytest-asyncio + django-latest: pytest-django + django-latest: Werkzeug + django-latest: channels[daphne] django-v1.8: Django~=1.8.0 django-v1.11: Django~=1.11.0 From 74621eb8cd38e827d605f1bebf9c82c5977f6c58 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 16:09:57 +0100 Subject: [PATCH 44/53] wip --- scripts/runtox.sh | 21 ++++++++++++++++++- .../split-tox-gh-actions.py | 1 - 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/runtox.sh b/scripts/runtox.sh index b6e11991db..ea62790432 100755 --- a/scripts/runtox.sh +++ b/scripts/runtox.sh @@ -13,9 +13,28 @@ else TOXPATH=./.venv/bin/tox fi +excludelatest=false +for arg in "$@" +do + if [ "$arg" = "--exclude-latest" ]; then + excludelatest=true + shift + break + fi +done + searchstring="$1" export TOX_PARALLEL_NO_SPINNER=1 -ENV="$($TOXPATH -l | grep "$searchstring" | tr $'\n' ',')" + +if $excludelatest; then + echo "Excluding latest" + ENV="$($TOXPATH -l | grep -- "$searchstring" | grep -v -- '-latest' | tr $'\n' ',')" +else + echo "Including latest" + ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')" +fi + +echo $ENV exec $TOXPATH -vv -e "$ENV" -- "${@:2}" diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index 98cc319156..82896cea86 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -84,7 +84,6 @@ def write_yaml_file( python_versions, python_versions_latest, ): - print(current_framework, "SHOULD TEST LATEST", python_versions_latest) """Write the YAML configuration file for one framework to disk.""" py_versions = sorted( [py.replace("py", "") for py in python_versions], From 7df7f868195823c8f42f67cdfb88572436bb7b23 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 16:11:35 +0100 Subject: [PATCH 45/53] wip --- .github/workflows/test-common.yml | 4 ++-- .github/workflows/test-integration-aiohttp.yml | 2 +- .github/workflows/test-integration-ariadne.yml | 2 +- .github/workflows/test-integration-arq.yml | 2 +- .github/workflows/test-integration-asgi.yml | 2 +- .github/workflows/test-integration-asyncpg.yml | 2 +- .github/workflows/test-integration-aws_lambda.yml | 2 +- .github/workflows/test-integration-beam.yml | 2 +- .github/workflows/test-integration-boto3.yml | 4 ++-- .github/workflows/test-integration-bottle.yml | 4 ++-- .github/workflows/test-integration-celery.yml | 4 ++-- .github/workflows/test-integration-chalice.yml | 2 +- .github/workflows/test-integration-clickhouse_driver.yml | 2 +- .github/workflows/test-integration-cloud_resource_context.yml | 2 +- .github/workflows/test-integration-django.yml | 4 ++-- .github/workflows/test-integration-falcon.yml | 4 ++-- .github/workflows/test-integration-fastapi.yml | 2 +- .github/workflows/test-integration-flask.yml | 4 ++-- .github/workflows/test-integration-gcp.yml | 2 +- .github/workflows/test-integration-gevent.yml | 4 ++-- .github/workflows/test-integration-gql.yml | 2 +- .github/workflows/test-integration-graphene.yml | 2 +- .github/workflows/test-integration-grpc.yml | 2 +- .github/workflows/test-integration-httpx.yml | 2 +- .github/workflows/test-integration-huey.yml | 4 ++-- .github/workflows/test-integration-loguru.yml | 2 +- .github/workflows/test-integration-opentelemetry.yml | 2 +- .github/workflows/test-integration-pure_eval.yml | 2 +- .github/workflows/test-integration-pymongo.yml | 4 ++-- .github/workflows/test-integration-pyramid.yml | 4 ++-- .github/workflows/test-integration-quart.yml | 2 +- .github/workflows/test-integration-redis.yml | 4 ++-- .github/workflows/test-integration-rediscluster.yml | 4 ++-- .github/workflows/test-integration-requests.yml | 4 ++-- .github/workflows/test-integration-rq.yml | 4 ++-- .github/workflows/test-integration-sanic.yml | 2 +- .github/workflows/test-integration-sqlalchemy.yml | 4 ++-- .github/workflows/test-integration-starlette.yml | 2 +- .github/workflows/test-integration-starlite.yml | 2 +- .github/workflows/test-integration-strawberry.yml | 2 +- .github/workflows/test-integration-tornado.yml | 2 +- .github/workflows/test-integration-trytond.yml | 2 +- scripts/split-tox-gh-actions/ci-yaml-test-py27-snippet.txt | 2 +- scripts/split-tox-gh-actions/ci-yaml-test-snippet.txt | 2 +- 44 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/test-common.yml b/.github/workflows/test-common.yml index 5dfcac9b47..203758205c 100644 --- a/.github/workflows/test-common.yml +++ b/.github/workflows/test-common.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-aiohttp.yml b/.github/workflows/test-integration-aiohttp.yml index 43a01519f7..abcf5f3fb0 100644 --- a/.github/workflows/test-integration-aiohttp.yml +++ b/.github/workflows/test-integration-aiohttp.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-ariadne.yml b/.github/workflows/test-integration-ariadne.yml index 923a935060..e821de427a 100644 --- a/.github/workflows/test-integration-ariadne.yml +++ b/.github/workflows/test-integration-ariadne.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-ariadne" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-arq.yml b/.github/workflows/test-integration-arq.yml index 1c7e32bdbb..beddc8e7a0 100644 --- a/.github/workflows/test-integration-arq.yml +++ b/.github/workflows/test-integration-arq.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-asgi.yml b/.github/workflows/test-integration-asgi.yml index cd3215d444..b06fc4f4d5 100644 --- a/.github/workflows/test-integration-asgi.yml +++ b/.github/workflows/test-integration-asgi.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-asyncpg.yml b/.github/workflows/test-integration-asyncpg.yml index 94a3434458..26c981f7ce 100644 --- a/.github/workflows/test-integration-asyncpg.yml +++ b/.github/workflows/test-integration-asyncpg.yml @@ -81,7 +81,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-asyncpg" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-asyncpg" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-aws_lambda.yml b/.github/workflows/test-integration-aws_lambda.yml index 032e5aafed..62a221a819 100644 --- a/.github/workflows/test-integration-aws_lambda.yml +++ b/.github/workflows/test-integration-aws_lambda.yml @@ -62,7 +62,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-beam.yml b/.github/workflows/test-integration-beam.yml index f0b9470baa..d0462c5ea5 100644 --- a/.github/workflows/test-integration-beam.yml +++ b/.github/workflows/test-integration-beam.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-boto3.yml b/.github/workflows/test-integration-boto3.yml index e0d9ecf151..7cb9d49e80 100644 --- a/.github/workflows/test-integration-boto3.yml +++ b/.github/workflows/test-integration-boto3.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-bottle.yml b/.github/workflows/test-integration-bottle.yml index 0b7ffa483a..f470f115c1 100644 --- a/.github/workflows/test-integration-bottle.yml +++ b/.github/workflows/test-integration-bottle.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-celery.yml b/.github/workflows/test-integration-celery.yml index e3437eeb44..f3b8589c22 100644 --- a/.github/workflows/test-integration-celery.yml +++ b/.github/workflows/test-integration-celery.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-chalice.yml b/.github/workflows/test-integration-chalice.yml index 74f43f5a2e..526f5c5c8a 100644 --- a/.github/workflows/test-integration-chalice.yml +++ b/.github/workflows/test-integration-chalice.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-clickhouse_driver.yml b/.github/workflows/test-integration-clickhouse_driver.yml index 6397db764b..272a90921c 100644 --- a/.github/workflows/test-integration-clickhouse_driver.yml +++ b/.github/workflows/test-integration-clickhouse_driver.yml @@ -62,7 +62,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-clickhouse_driver" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-clickhouse_driver" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-cloud_resource_context.yml b/.github/workflows/test-integration-cloud_resource_context.yml index 45908f2084..0797cb81fc 100644 --- a/.github/workflows/test-integration-cloud_resource_context.yml +++ b/.github/workflows/test-integration-cloud_resource_context.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 521bea71af..37328ef8d6 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -81,7 +81,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-django" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-django" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -134,7 +134,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-django" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-django" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 173e1115fd..b0aadaed7a 100644 --- a/.github/workflows/test-integration-falcon.yml +++ b/.github/workflows/test-integration-falcon.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-falcon" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-falcon" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-falcon" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-fastapi.yml b/.github/workflows/test-integration-fastapi.yml index 3895921601..1b1960d13b 100644 --- a/.github/workflows/test-integration-fastapi.yml +++ b/.github/workflows/test-integration-fastapi.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-fastapi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-flask.yml b/.github/workflows/test-integration-flask.yml index 013f0a4dc6..a0a886e807 100644 --- a/.github/workflows/test-integration-flask.yml +++ b/.github/workflows/test-integration-flask.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-flask" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-flask" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-flask" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-gcp.yml b/.github/workflows/test-integration-gcp.yml index 81e03cdbf1..604fb9cf67 100644 --- a/.github/workflows/test-integration-gcp.yml +++ b/.github/workflows/test-integration-gcp.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-gevent.yml b/.github/workflows/test-integration-gevent.yml index 22589b381a..65617a5847 100644 --- a/.github/workflows/test-integration-gevent.yml +++ b/.github/workflows/test-integration-gevent.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-gevent" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gevent" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-gevent" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-gevent" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-gql.yml b/.github/workflows/test-integration-gql.yml index 6806db6c49..c0ac1c3071 100644 --- a/.github/workflows/test-integration-gql.yml +++ b/.github/workflows/test-integration-gql.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-gql" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gql" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-graphene.yml b/.github/workflows/test-integration-graphene.yml index 2d42284e7e..fb44f2fec3 100644 --- a/.github/workflows/test-integration-graphene.yml +++ b/.github/workflows/test-integration-graphene.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-graphene" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-graphene" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-grpc.yml b/.github/workflows/test-integration-grpc.yml index d3c140a08b..ab6892fda2 100644 --- a/.github/workflows/test-integration-grpc.yml +++ b/.github/workflows/test-integration-grpc.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-grpc" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-grpc" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-httpx.yml b/.github/workflows/test-integration-httpx.yml index e61f6a6bff..52ab457709 100644 --- a/.github/workflows/test-integration-httpx.yml +++ b/.github/workflows/test-integration-httpx.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-httpx" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-httpx" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-huey.yml b/.github/workflows/test-integration-huey.yml index 6c9878af8c..63c5b223b5 100644 --- a/.github/workflows/test-integration-huey.yml +++ b/.github/workflows/test-integration-huey.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-loguru.yml b/.github/workflows/test-integration-loguru.yml index c007f5dbb8..0545c471b0 100644 --- a/.github/workflows/test-integration-loguru.yml +++ b/.github/workflows/test-integration-loguru.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-loguru" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-loguru" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-opentelemetry.yml b/.github/workflows/test-integration-opentelemetry.yml index b63ffba5aa..f34fcfe93b 100644 --- a/.github/workflows/test-integration-opentelemetry.yml +++ b/.github/workflows/test-integration-opentelemetry.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-opentelemetry" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-pure_eval.yml b/.github/workflows/test-integration-pure_eval.yml index 30cc627604..04e6ffd674 100644 --- a/.github/workflows/test-integration-pure_eval.yml +++ b/.github/workflows/test-integration-pure_eval.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-pure_eval" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-pymongo.yml b/.github/workflows/test-integration-pymongo.yml index 32939a4481..b3f94b33a9 100644 --- a/.github/workflows/test-integration-pymongo.yml +++ b/.github/workflows/test-integration-pymongo.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-pymongo" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-pymongo" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-pymongo" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-pymongo" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-pyramid.yml b/.github/workflows/test-integration-pyramid.yml index ec3c986e5b..7a6065563c 100644 --- a/.github/workflows/test-integration-pyramid.yml +++ b/.github/workflows/test-integration-pyramid.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-pyramid" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-pyramid" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-pyramid" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-quart.yml b/.github/workflows/test-integration-quart.yml index 3644417ca8..307c3cc60c 100644 --- a/.github/workflows/test-integration-quart.yml +++ b/.github/workflows/test-integration-quart.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-quart" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-redis.yml b/.github/workflows/test-integration-redis.yml index 87d26fd0ff..c1f1ec95e5 100644 --- a/.github/workflows/test-integration-redis.yml +++ b/.github/workflows/test-integration-redis.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-redis" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-redis" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-redis" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-redis" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-rediscluster.yml b/.github/workflows/test-integration-rediscluster.yml index 051ee20842..d33d3e4e1e 100644 --- a/.github/workflows/test-integration-rediscluster.yml +++ b/.github/workflows/test-integration-rediscluster.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-rediscluster" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rediscluster" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-rediscluster" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-rediscluster" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-requests.yml b/.github/workflows/test-integration-requests.yml index 900d7f9848..ada96618c2 100644 --- a/.github/workflows/test-integration-requests.yml +++ b/.github/workflows/test-integration-requests.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-requests" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-requests" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-requests" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-requests" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-rq.yml b/.github/workflows/test-integration-rq.yml index b51bf0c280..9474ecaba1 100644 --- a/.github/workflows/test-integration-rq.yml +++ b/.github/workflows/test-integration-rq.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-sanic.yml b/.github/workflows/test-integration-sanic.yml index d84ca5d46d..32a6736c40 100644 --- a/.github/workflows/test-integration-sanic.yml +++ b/.github/workflows/test-integration-sanic.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-sanic" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-sqlalchemy.yml b/.github/workflows/test-integration-sqlalchemy.yml index 201e27fc5a..b8ba174045 100644 --- a/.github/workflows/test-integration-sqlalchemy.yml +++ b/.github/workflows/test-integration-sqlalchemy.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-sqlalchemy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i @@ -94,7 +94,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py2.7-sqlalchemy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-sqlalchemy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-starlette.yml b/.github/workflows/test-integration-starlette.yml index 8ef5694354..5b0f1a01cc 100644 --- a/.github/workflows/test-integration-starlette.yml +++ b/.github/workflows/test-integration-starlette.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-starlette" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-starlite.yml b/.github/workflows/test-integration-starlite.yml index e0f9cbc75a..281d821b94 100644 --- a/.github/workflows/test-integration-starlite.yml +++ b/.github/workflows/test-integration-starlite.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-starlite" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-strawberry.yml b/.github/workflows/test-integration-strawberry.yml index aef4c907f0..5ce924bfa2 100644 --- a/.github/workflows/test-integration-strawberry.yml +++ b/.github/workflows/test-integration-strawberry.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-strawberry" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-tornado.yml b/.github/workflows/test-integration-tornado.yml index 81fcbd70d8..f45af2b4db 100644 --- a/.github/workflows/test-integration-tornado.yml +++ b/.github/workflows/test-integration-tornado.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-tornado" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/.github/workflows/test-integration-trytond.yml b/.github/workflows/test-integration-trytond.yml index 91623cd6bd..676f6e4872 100644 --- a/.github/workflows/test-integration-trytond.yml +++ b/.github/workflows/test-integration-trytond.yml @@ -60,7 +60,7 @@ jobs: coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-trytond" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-trytond" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-py27-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-py27-snippet.txt index 94723c1658..0964dc38a6 100644 --- a/scripts/split-tox-gh-actions/ci-yaml-test-py27-snippet.txt +++ b/scripts/split-tox-gh-actions/ci-yaml-test-py27-snippet.txt @@ -24,6 +24,6 @@ coverage erase # Run tests - ./scripts/runtox.sh "py2.7-{{ framework }}" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py2.7-{{ framework }}" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-snippet.txt index c2d10596ea..161b34f16b 100644 --- a/scripts/split-tox-gh-actions/ci-yaml-test-snippet.txt +++ b/scripts/split-tox-gh-actions/ci-yaml-test-snippet.txt @@ -29,7 +29,7 @@ coverage erase # Run tests - ./scripts/runtox.sh "py${{ matrix.python-version }}-{{ framework }}" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && + ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-{{ framework }}" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch && coverage combine .coverage* && coverage xml -i From 43969e9d3e89cf36eb047e0dbf19de8a5d7630af Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 16:39:39 +0100 Subject: [PATCH 46/53] new werkzeug compat --- tests/conftest.py | 15 +++ tests/integrations/django/test_basic.py | 102 +++++++++++------- .../django/test_data_scrubbing.py | 19 ++-- 3 files changed, 87 insertions(+), 49 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5b0f1a8493..b112d5e1ac 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -602,3 +602,18 @@ def create_mock_http_server(): mock_server_thread.start() return mock_server_port + + +def get_werkzeug_response(response): + try: + content, status, headers = response + return b"".join(content), status, headers + except TypeError: + return response.get_data(), response.status, response.headers + + +def werkzeug_set_cookie(client, servername, key, value): + try: + client.set_cookie(servername, key, value) + except TypeError: + client.set_cookie(key, value) diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index a323d8c922..68e980270e 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -27,6 +27,7 @@ from sentry_sdk.integrations.django.caching import _get_span_description from sentry_sdk.integrations.executing import ExecutingIntegration from sentry_sdk.tracing import Span +from tests.conftest import get_werkzeug_response from tests.integrations.django.myapp.wsgi import application from tests.integrations.django.utils import pytest_mark_django_db_decorator @@ -133,8 +134,9 @@ def test_middleware_exceptions(sentry_init, client, capture_exceptions): def test_request_captured(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = client.get(reverse("message")) - assert b"".join(content) == b"ok" + content, status, headers = get_werkzeug_response(client.get(reverse("message"))) + + assert content == b"ok" (event,) = events assert event["transaction"] == "/message" @@ -154,7 +156,7 @@ def test_transaction_with_class_view(sentry_init, client, capture_events): send_default_pii=True, ) events = capture_events() - content, status, headers = client.head(reverse("classbased")) + content, status, headers = get_werkzeug_response(client.head(reverse("classbased"))) assert status.lower() == "200 ok" (event,) = events @@ -276,13 +278,13 @@ def test_trace_from_headers_if_performance_disabled( def test_user_captured(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = client.get(reverse("mylogin")) - assert b"".join(content) == b"ok" + content, status, headers = get_werkzeug_response(client.get(reverse("mylogin"))) + assert content == b"ok" assert not events - content, status, headers = client.get(reverse("message")) - assert b"".join(content) == b"ok" + content, status, headers = get_werkzeug_response(client.get(reverse("message"))) + assert content == b"ok" (event,) = events @@ -319,7 +321,7 @@ def test_queryset_repr(sentry_init, capture_events): def test_custom_error_handler_request_context(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = client.post("/404") + content, status, headers = get_werkzeug_response(client.post("/404")) assert status.lower() == "404 not found" (event,) = events @@ -339,9 +341,9 @@ def test_500(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = client.get("/view-exc") + content, status, headers = get_werkzeug_response(client.get("/view-exc")) assert status.lower() == "500 internal server error" - content = b"".join(content).decode("utf-8") + content = content.decode("utf-8") (event,) = events event_id = event["event_id"] @@ -437,7 +439,9 @@ def test_response_trace(sentry_init, client, capture_events, render_span_tree): ) events = capture_events() - content, status, headers = client.get(reverse("rest_json_response")) + content, status, headers = get_werkzeug_response( + client.get(reverse("rest_json_response")) + ) assert status == "200 OK" assert ( @@ -571,7 +575,9 @@ def test_django_connect_trace(sentry_init, client, capture_events, render_span_t events = capture_events() - content, status, headers = client.get(reverse("postgres_select")) + content, status, headers = get_werkzeug_response( + client.get(reverse("postgres_select")) + ) assert status == "200 OK" (event,) = events @@ -638,7 +644,9 @@ def test_db_connection_span_data(sentry_init, client, capture_events): events = capture_events() - content, status, headers = client.get(reverse("postgres_select")) + content, status, headers = get_werkzeug_response( + client.get(reverse("postgres_select")) + ) assert status == "200 OK" (event,) = events @@ -705,8 +713,8 @@ def test_transaction_style( send_default_pii=True, ) events = capture_events() - content, status, headers = client.get(client_url) - assert b"".join(content) == expected_response + content, status, headers = get_werkzeug_response(client.get(client_url)) + assert content == expected_response (event,) = events assert event["transaction"] == expected_transaction @@ -716,11 +724,11 @@ def test_transaction_style( def test_request_body(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = client.post( - reverse("post_echo"), data=b"heyooo", content_type="text/plain" + content, status, headers = get_werkzeug_response( + client.post(reverse("post_echo"), data=b"heyooo", content_type="text/plain") ) assert status.lower() == "200 ok" - assert b"".join(content) == b"heyooo" + assert content == b"heyooo" (event,) = events @@ -732,11 +740,13 @@ def test_request_body(sentry_init, client, capture_events): del events[:] - content, status, headers = client.post( - reverse("post_echo"), data=b'{"hey": 42}', content_type="application/json" + content, status, headers = get_werkzeug_response( + client.post( + reverse("post_echo"), data=b'{"hey": 42}', content_type="application/json" + ) ) assert status.lower() == "200 ok" - assert b"".join(content) == b'{"hey": 42}' + assert content == b'{"hey": 42}' (event,) = events @@ -750,10 +760,12 @@ def test_read_request(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = client.post( - reverse("read_body_and_view_exc"), - data=b'{"hey": 42}', - content_type="application/json", + content, status, headers = get_werkzeug_response( + client.post( + reverse("read_body_and_view_exc"), + data=b'{"hey": 42}', + content_type="application/json", + ) ) assert status.lower() == "500 internal server error" @@ -767,8 +779,8 @@ def test_template_tracing_meta(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, _, _ = client.get(reverse("template_test3")) - rendered_meta = b"".join(content).decode("utf-8") + content, _, _ = get_werkzeug_response(client.get(reverse("template_test3"))) + rendered_meta = content.decode("utf-8") traceparent, baggage = events[0]["message"].split("\n") assert traceparent != "" @@ -793,7 +805,9 @@ def test_template_exception( sentry_init(integrations=[DjangoIntegration()] + with_executing_integration) events = capture_events() - content, status, headers = client.get(reverse("template_exc")) + content, status, headers = get_werkzeug_response( + client.get(reverse("template_exc")) + ) assert status.lower() == "500 internal server error" (event,) = events @@ -881,7 +895,7 @@ def test_does_not_capture_403(sentry_init, client, capture_events, endpoint): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - _, status, _ = client.get(reverse(endpoint)) + _, status, _ = get_werkzeug_response(client.get(reverse(endpoint))) assert status.lower() == "403 forbidden" assert not events @@ -1027,23 +1041,31 @@ def test_csrf(sentry_init, client): sentry_init(integrations=[DjangoIntegration()]) - content, status, _headers = client.post(reverse("csrf_hello_not_exempt")) + content, status, _headers = get_werkzeug_response( + client.post(reverse("csrf_hello_not_exempt")) + ) assert status.lower() == "403 forbidden" - content, status, _headers = client.post(reverse("sentryclass_csrf")) + content, status, _headers = get_werkzeug_response( + client.post(reverse("sentryclass_csrf")) + ) assert status.lower() == "403 forbidden" - content, status, _headers = client.post(reverse("sentryclass")) + content, status, _headers = get_werkzeug_response( + client.post(reverse("sentryclass")) + ) assert status.lower() == "200 ok" - assert b"".join(content) == b"ok" + assert content == b"ok" - content, status, _headers = client.post(reverse("classbased")) + content, status, _headers = get_werkzeug_response( + client.post(reverse("classbased")) + ) assert status.lower() == "200 ok" - assert b"".join(content) == b"ok" + assert content == b"ok" - content, status, _headers = client.post(reverse("message")) + content, status, _headers = get_werkzeug_response(client.post(reverse("message"))) assert status.lower() == "200 ok" - assert b"".join(content) == b"ok" + assert content == b"ok" @pytest.mark.skipif(DJANGO_VERSION < (2, 0), reason="Requires Django > 2.0") @@ -1062,15 +1084,15 @@ def test_custom_urlconf_middleware( sentry_init(integrations=[DjangoIntegration()], traces_sample_rate=1.0) events = capture_events() - content, status, _headers = client.get("/custom/ok") + content, status, _headers = get_werkzeug_response(client.get("/custom/ok")) assert status.lower() == "200 ok" - assert b"".join(content) == b"custom ok" + assert content == b"custom ok" event = events.pop(0) assert event["transaction"] == "/custom/ok" assert "custom_urlconf_middleware" in render_span_tree(event) - _content, status, _headers = client.get("/custom/exc") + _content, status, _headers = get_werkzeug_response(client.get("/custom/exc")) assert status.lower() == "500 internal server error" error_event, transaction_event = events diff --git a/tests/integrations/django/test_data_scrubbing.py b/tests/integrations/django/test_data_scrubbing.py index b3e531183f..128da9b97e 100644 --- a/tests/integrations/django/test_data_scrubbing.py +++ b/tests/integrations/django/test_data_scrubbing.py @@ -3,6 +3,7 @@ from werkzeug.test import Client from sentry_sdk.integrations.django import DjangoIntegration +from tests.conftest import werkzeug_set_cookie from tests.integrations.django.myapp.wsgi import application from tests.integrations.django.utils import pytest_mark_django_db_decorator @@ -26,9 +27,9 @@ def test_scrub_django_session_cookies_removed( ): sentry_init(integrations=[DjangoIntegration()], send_default_pii=False) events = capture_events() - client.set_cookie("localhost", "sessionid", "123") - client.set_cookie("localhost", "csrftoken", "456") - client.set_cookie("localhost", "foo", "bar") + werkzeug_set_cookie(client, "localhost", "sessionid", "123") + werkzeug_set_cookie(client, "localhost", "csrftoken", "456") + werkzeug_set_cookie(client, "localhost", "foo", "bar") client.get(reverse("view_exc")) (event,) = events @@ -44,9 +45,9 @@ def test_scrub_django_session_cookies_filtered( ): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - client.set_cookie("localhost", "sessionid", "123") - client.set_cookie("localhost", "csrftoken", "456") - client.set_cookie("localhost", "foo", "bar") + werkzeug_set_cookie(client, "localhost", "sessionid", "123") + werkzeug_set_cookie(client, "localhost", "csrftoken", "456") + werkzeug_set_cookie(client, "localhost", "foo", "bar") client.get(reverse("view_exc")) (event,) = events @@ -70,9 +71,9 @@ def test_scrub_django_custom_session_cookies_filtered( sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - client.set_cookie("localhost", "my_sess", "123") - client.set_cookie("localhost", "csrf_secret", "456") - client.set_cookie("localhost", "foo", "bar") + werkzeug_set_cookie(client, "localhost", "my_sess", "123") + werkzeug_set_cookie(client, "localhost", "csrf_secret", "456") + werkzeug_set_cookie(client, "localhost", "foo", "bar") client.get(reverse("view_exc")) (event,) = events From 1841da53a8590918bcba7e64b385d6954b1e6907 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 22 Nov 2023 16:57:59 +0100 Subject: [PATCH 47/53] fix? --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 602b18ebcd..bdb8a51a45 100644 --- a/tox.ini +++ b/tox.ini @@ -321,7 +321,7 @@ deps = # Django django: psycopg2-binary django-v{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: djangorestframework>=3.0.0,<4.0.0 - django-v{1.11,2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne] + django-v{2.0,2.2,3.0,3.2,4.0,4.1,4.2,5.0}: channels[daphne] django-v{1.8,1.11,2.0,2.2,3.0,3.2}: Werkzeug<2.1.0 django-v{1.8,1.11,2.0}: pytest-django<4.0 django-v{2.2,3.0,3.2,4.0,4.1,4.2,5.0}: pytest-django From 22e60749ca85434993a0108d478e70b7edc6f200 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 11:26:58 +0100 Subject: [PATCH 48/53] rename --- tests/conftest.py | 9 ++-- tests/integrations/django/test_basic.py | 52 ++++++++++++---------- tests/integrations/pyramid/test_pyramid.py | 11 +++-- 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index b112d5e1ac..728e53b9ec 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -604,15 +604,18 @@ def create_mock_http_server(): return mock_server_port -def get_werkzeug_response(response): +def unpack_werkzeug_response(response): + # werkzeug < 2.1 returns a tuple as client response, newer versions return + # an object try: + return response.get_data(), response.status, response.headers + except TypeError: content, status, headers = response return b"".join(content), status, headers - except TypeError: - return response.get_data(), response.status, response.headers def werkzeug_set_cookie(client, servername, key, value): + # client.set_cookie has a different signature in different werkzeug versions try: client.set_cookie(servername, key, value) except TypeError: diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index 68e980270e..095657fd8a 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -27,7 +27,7 @@ from sentry_sdk.integrations.django.caching import _get_span_description from sentry_sdk.integrations.executing import ExecutingIntegration from sentry_sdk.tracing import Span -from tests.conftest import get_werkzeug_response +from tests.conftest import unpack_werkzeug_response from tests.integrations.django.myapp.wsgi import application from tests.integrations.django.utils import pytest_mark_django_db_decorator @@ -134,7 +134,7 @@ def test_middleware_exceptions(sentry_init, client, capture_exceptions): def test_request_captured(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = get_werkzeug_response(client.get(reverse("message"))) + content, status, headers = unpack_werkzeug_response(client.get(reverse("message"))) assert content == b"ok" @@ -156,7 +156,9 @@ def test_transaction_with_class_view(sentry_init, client, capture_events): send_default_pii=True, ) events = capture_events() - content, status, headers = get_werkzeug_response(client.head(reverse("classbased"))) + content, status, headers = unpack_werkzeug_response( + client.head(reverse("classbased")) + ) assert status.lower() == "200 ok" (event,) = events @@ -278,12 +280,12 @@ def test_trace_from_headers_if_performance_disabled( def test_user_captured(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = get_werkzeug_response(client.get(reverse("mylogin"))) + content, status, headers = unpack_werkzeug_response(client.get(reverse("mylogin"))) assert content == b"ok" assert not events - content, status, headers = get_werkzeug_response(client.get(reverse("message"))) + content, status, headers = unpack_werkzeug_response(client.get(reverse("message"))) assert content == b"ok" (event,) = events @@ -321,7 +323,7 @@ def test_queryset_repr(sentry_init, capture_events): def test_custom_error_handler_request_context(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = get_werkzeug_response(client.post("/404")) + content, status, headers = unpack_werkzeug_response(client.post("/404")) assert status.lower() == "404 not found" (event,) = events @@ -341,7 +343,7 @@ def test_500(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()], send_default_pii=True) events = capture_events() - content, status, headers = get_werkzeug_response(client.get("/view-exc")) + content, status, headers = unpack_werkzeug_response(client.get("/view-exc")) assert status.lower() == "500 internal server error" content = content.decode("utf-8") @@ -439,7 +441,7 @@ def test_response_trace(sentry_init, client, capture_events, render_span_tree): ) events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.get(reverse("rest_json_response")) ) assert status == "200 OK" @@ -575,7 +577,7 @@ def test_django_connect_trace(sentry_init, client, capture_events, render_span_t events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.get(reverse("postgres_select")) ) assert status == "200 OK" @@ -644,7 +646,7 @@ def test_db_connection_span_data(sentry_init, client, capture_events): events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.get(reverse("postgres_select")) ) assert status == "200 OK" @@ -713,7 +715,7 @@ def test_transaction_style( send_default_pii=True, ) events = capture_events() - content, status, headers = get_werkzeug_response(client.get(client_url)) + content, status, headers = unpack_werkzeug_response(client.get(client_url)) assert content == expected_response (event,) = events @@ -724,7 +726,7 @@ def test_transaction_style( def test_request_body(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.post(reverse("post_echo"), data=b"heyooo", content_type="text/plain") ) assert status.lower() == "200 ok" @@ -740,7 +742,7 @@ def test_request_body(sentry_init, client, capture_events): del events[:] - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.post( reverse("post_echo"), data=b'{"hey": 42}', content_type="application/json" ) @@ -760,7 +762,7 @@ def test_read_request(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.post( reverse("read_body_and_view_exc"), data=b'{"hey": 42}', @@ -779,7 +781,7 @@ def test_template_tracing_meta(sentry_init, client, capture_events): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - content, _, _ = get_werkzeug_response(client.get(reverse("template_test3"))) + content, _, _ = unpack_werkzeug_response(client.get(reverse("template_test3"))) rendered_meta = content.decode("utf-8") traceparent, baggage = events[0]["message"].split("\n") @@ -805,7 +807,7 @@ def test_template_exception( sentry_init(integrations=[DjangoIntegration()] + with_executing_integration) events = capture_events() - content, status, headers = get_werkzeug_response( + content, status, headers = unpack_werkzeug_response( client.get(reverse("template_exc")) ) assert status.lower() == "500 internal server error" @@ -895,7 +897,7 @@ def test_does_not_capture_403(sentry_init, client, capture_events, endpoint): sentry_init(integrations=[DjangoIntegration()]) events = capture_events() - _, status, _ = get_werkzeug_response(client.get(reverse(endpoint))) + _, status, _ = unpack_werkzeug_response(client.get(reverse(endpoint))) assert status.lower() == "403 forbidden" assert not events @@ -1041,29 +1043,31 @@ def test_csrf(sentry_init, client): sentry_init(integrations=[DjangoIntegration()]) - content, status, _headers = get_werkzeug_response( + content, status, _headers = unpack_werkzeug_response( client.post(reverse("csrf_hello_not_exempt")) ) assert status.lower() == "403 forbidden" - content, status, _headers = get_werkzeug_response( + content, status, _headers = unpack_werkzeug_response( client.post(reverse("sentryclass_csrf")) ) assert status.lower() == "403 forbidden" - content, status, _headers = get_werkzeug_response( + content, status, _headers = unpack_werkzeug_response( client.post(reverse("sentryclass")) ) assert status.lower() == "200 ok" assert content == b"ok" - content, status, _headers = get_werkzeug_response( + content, status, _headers = unpack_werkzeug_response( client.post(reverse("classbased")) ) assert status.lower() == "200 ok" assert content == b"ok" - content, status, _headers = get_werkzeug_response(client.post(reverse("message"))) + content, status, _headers = unpack_werkzeug_response( + client.post(reverse("message")) + ) assert status.lower() == "200 ok" assert content == b"ok" @@ -1084,7 +1088,7 @@ def test_custom_urlconf_middleware( sentry_init(integrations=[DjangoIntegration()], traces_sample_rate=1.0) events = capture_events() - content, status, _headers = get_werkzeug_response(client.get("/custom/ok")) + content, status, _headers = unpack_werkzeug_response(client.get("/custom/ok")) assert status.lower() == "200 ok" assert content == b"custom ok" @@ -1092,7 +1096,7 @@ def test_custom_urlconf_middleware( assert event["transaction"] == "/custom/ok" assert "custom_urlconf_middleware" in render_span_tree(event) - _content, status, _headers = get_werkzeug_response(client.get("/custom/exc")) + _content, status, _headers = unpack_werkzeug_response(client.get("/custom/exc")) assert status.lower() == "500 internal server error" error_event, transaction_event = events diff --git a/tests/integrations/pyramid/test_pyramid.py b/tests/integrations/pyramid/test_pyramid.py index 1f93a52f2c..6237174604 100644 --- a/tests/integrations/pyramid/test_pyramid.py +++ b/tests/integrations/pyramid/test_pyramid.py @@ -1,18 +1,17 @@ import json import logging -import pytest from io import BytesIO import pyramid.testing - +import pytest from pyramid.authorization import ACLAuthorizationPolicy from pyramid.response import Response +from werkzeug.test import Client from sentry_sdk import capture_message, add_breadcrumb from sentry_sdk.integrations.pyramid import PyramidIntegration from sentry_sdk.serializer import MAX_DATABAG_BREADTH - -from werkzeug.test import Client +from tests.conftest import unpack_werkzeug_response try: @@ -317,8 +316,8 @@ def errorhandler(exc, request): pyramid_config.add_view(errorhandler, context=Exception) client = get_client() - app_iter, status, headers = client.get("/") - assert b"".join(app_iter) == b"bad request" + app_iter, status, headers = unpack_werkzeug_response(client.get("/")) + assert app_iter == b"bad request" assert status.lower() == "500 internal server error" (error,) = errors From ac565269437d61b49d0c7dfba5e496c941309acc Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 11:32:41 +0100 Subject: [PATCH 49/53] fix django latest postgres --- .github/workflows/test-integration-django.yml | 2 +- .../split-tox-gh-actions/ci-yaml-test-latest-snippet.txt | 2 +- scripts/split-tox-gh-actions/split-tox-gh-actions.py | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-integration-django.yml b/.github/workflows/test-integration-django.yml index 37328ef8d6..4e448ffefa 100644 --- a/.github/workflows/test-integration-django.yml +++ b/.github/workflows/test-integration-django.yml @@ -170,7 +170,7 @@ jobs: SENTRY_PYTHON_TEST_POSTGRES_USER: postgres SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry SENTRY_PYTHON_TEST_POSTGRES_NAME: ci_test - SENTRY_PYTHON_TEST_POSTGRES_HOST: postgres + SENTRY_PYTHON_TEST_POSTGRES_HOST: localhost steps: - uses: actions/checkout@v4 diff --git a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt index 4a2aec033e..7c7a8dfb60 100644 --- a/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt +++ b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt @@ -3,7 +3,7 @@ runs-on: ${{ matrix.os }} timeout-minutes: 30 {{ strategy_matrix_latest }} -{{ services }} +{{ services_latest }} steps: - uses: actions/checkout@v4 diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index 82896cea86..eada70db54 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -144,13 +144,15 @@ def write_yaml_file( ) out += m - elif template_line.strip() == "{{ services }}": + elif template_line.strip() in ("{{ services }}", "{{ services_latest }}"): if current_framework in FRAMEWORKS_NEEDING_POSTGRES: f = open(TEMPLATE_FILE_SERVICES, "r") lines = [ line.replace( "{{ postgres_host }}", - "postgres" if py27_test_part else "localhost", + "postgres" + if py27_test_part and "_latest" not in template_line + else "localhost", ) for line in f.readlines() ] From 2fd974b6e5a0dc9452bc836af2dae0d2aeddb1c9 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 11:43:19 +0100 Subject: [PATCH 50/53] fix werkzeug compat --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 728e53b9ec..44ee18b4ee 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -609,7 +609,7 @@ def unpack_werkzeug_response(response): # an object try: return response.get_data(), response.status, response.headers - except TypeError: + except AttributeError: content, status, headers = response return b"".join(content), status, headers From 9ec095a2d44fb5efa5f798280ceec9135408102c Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 12:20:36 +0100 Subject: [PATCH 51/53] add note --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index bdb8a51a45..6c2db42153 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,9 @@ envlist = # instead of: # {py3.7}-django-v{3.2} # {py3.7,py3.10}-django-v{3.2,4.0} + # + # At a minimum, we should test against at least the lowest + # and the latest supported version of a framework. # AIOHTTP {py3.7}-aiohttp-v{3.4} From 878318c1e91369053691e12337cb0db4e7207a6d Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 12:22:50 +0100 Subject: [PATCH 52/53] remove extra echo --- scripts/runtox.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/runtox.sh b/scripts/runtox.sh index ea62790432..6090da7a92 100755 --- a/scripts/runtox.sh +++ b/scripts/runtox.sh @@ -35,6 +35,4 @@ else ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')" fi -echo $ENV - exec $TOXPATH -vv -e "$ENV" -- "${@:2}" From 3b8f51da044f33a3fa89032e3ae07c07f34f5075 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Thu, 23 Nov 2023 17:02:06 +0100 Subject: [PATCH 53/53] Add more starlite tests --- tests/integrations/starlite/test_starlite.py | 10 ++-------- tox.ini | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/integrations/starlite/test_starlite.py b/tests/integrations/starlite/test_starlite.py index 4fbcf65c03..0412133f5e 100644 --- a/tests/integrations/starlite/test_starlite.py +++ b/tests/integrations/starlite/test_starlite.py @@ -229,13 +229,10 @@ def test_middleware_callback_spans(sentry_init, capture_events): "tags": {"starlite.middleware_name": "SampleMiddleware"}, }, ] - print(transaction_event["spans"]) - idx = 0 - for span in transaction_event["spans"]: + for idx, span in enumerate(transaction_event["spans"]): assert span["op"] == expected[idx]["op"] assert span["description"] == expected[idx]["description"] assert span["tags"] == expected[idx]["tags"] - idx += 1 def test_middleware_receive_send(sentry_init, capture_events): @@ -290,12 +287,10 @@ def test_middleware_partial_receive_send(sentry_init, capture_events): }, ] - idx = 0 - for span in transaction_event["spans"]: + for idx, span in enumerate(transaction_event["spans"]): assert span["op"] == expected[idx]["op"] assert span["description"].startswith(expected[idx]["description"]) assert span["tags"] == expected[idx]["tags"] - idx += 1 def test_last_event_id(sentry_init, capture_events): @@ -315,7 +310,6 @@ def handler(request, exc): client = TestClient(app, raise_server_exceptions=False) response = client.get("/custom_error") assert response.status_code == 500 - print(events) event = events[-1] assert response.content.strip().decode("ascii").strip('"') == event["event_id"] (exception,) = event["exception"]["values"] diff --git a/tox.ini b/tox.ini index 6c2db42153..46477750e9 100644 --- a/tox.ini +++ b/tox.ini @@ -204,7 +204,7 @@ envlist = {py3.8,py3.9,py3.10,py3.11,py3.12}-starlette-latest # Starlite - {py3.8,py3.9,py3.10,py3.11}-starlite-v{1.51} + {py3.8,py3.9,py3.10,py3.11}-starlite-v{1.48,1.51} # 1.51.14 is the last starlite version; the project continues as litestar # SQL Alchemy @@ -540,6 +540,7 @@ deps = starlite: cryptography starlite: pydantic<2.0.0 {py3.8,py3.9}-starlite: typing-extensions==4.5.0 # this is used by pydantic, which is used by starlite. When the problem is fixed in here or pydantic, this can be removed + starlite-v{1.48}: starlite~=1.48.0 starlite-v{1.51}: starlite~=1.51.0 # SQLAlchemy