diff --git a/.github/workflows/test-common.yml b/.github/workflows/test-common.yml index 7204c5d7d7..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,10 +94,11 @@ 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 + 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: aiohttp latest, 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"] + # 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..e821de427a 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: ariadne latest, 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..beddc8e7a0 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: arq latest, 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..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 @@ -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..26c981f7ce 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 @@ -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 @@ -91,6 +91,73 @@ jobs: files: coverage.xml + test-latest: + name: asyncpg latest, 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] + 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..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 @@ -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 a86d6ccd7d..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: beam latest, 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"] + # 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 fb246c899e..7cb9d49e80 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.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 @@ -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,10 +94,56 @@ 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 + test-latest: + name: boto3 latest, 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 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..f470f115c1 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 @@ -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,10 +94,56 @@ 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 + + test-latest: + name: bottle latest, 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..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,10 +94,56 @@ 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 + test-latest: + name: celery latest, 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"] + # 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 6615aeb75d..526f5c5c8a 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"] # 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: chalice latest, 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"] + # 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..272a90921c 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 @@ -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 @@ -72,6 +72,54 @@ jobs: files: coverage.xml + test-latest: + name: clickhouse_driver latest, 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..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 @@ -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..4e448ffefa 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,10 +134,77 @@ 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 + test-latest: + name: django latest, 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: 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 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 needs: [test, test-py27] diff --git a/.github/workflows/test-integration-falcon.yml b/.github/workflows/test-integration-falcon.yml index 09d8ff8d80..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,10 +94,56 @@ 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 + test-latest: + name: falcon latest, 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 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..1b1960d13b 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: fastapi latest, 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 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..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,10 +94,56 @@ 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 + test-latest: + name: flask latest, 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] + + 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..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 @@ -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..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,10 +94,11 @@ 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 + 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: gql latest, 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..fb44f2fec3 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: graphene latest, 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..ab6892fda2 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: grpc latest, 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 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: httpx latest, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + + strategy: + fail-fast: false + matrix: + 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 + # 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..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,10 +94,56 @@ 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 + test-latest: + name: huey latest, 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: loguru latest, 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..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 @@ -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..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 @@ -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..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,10 +94,56 @@ 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 + test-latest: + name: pymongo latest, 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 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..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,10 +94,56 @@ 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 + test-latest: + name: pyramid latest, 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 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: quart latest, 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 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..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,10 +94,56 @@ 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 + test-latest: + name: redis latest, 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 73ed5c1733..d33d3e4e1e 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 @@ -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,10 +94,11 @@ 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 + 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..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,10 +94,11 @@ 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 + 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..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,10 +94,56 @@ 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 + test-latest: + name: rq latest, 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 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: sanic latest, 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"] + # 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..b8ba174045 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 @@ -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,10 +94,56 @@ 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 + + test-latest: + name: sqlalchemy latest, 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: starlette latest, 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 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..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 @@ -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..5ce924bfa2 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 @@ -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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: strawberry latest, 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: tornado latest, 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 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..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 @@ -70,6 +70,52 @@ jobs: files: coverage.xml + test-latest: + name: trytond latest, 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 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 31be9bfb4b..6090da7a92 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 @@ -13,15 +13,26 @@ 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' ',')" -# 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}" +if $excludelatest; then + echo "Excluding latest" + ENV="$($TOXPATH -l | grep -- "$searchstring" | grep -v -- '-latest' | tr $'\n' ',')" else - exec $TOXPATH -vv -e "$ENV" -- "${@:2}" + echo "Including latest" + ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')" fi + +exec $TOXPATH -vv -e "$ENV" -- "${@:2}" 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..7c7a8dfb60 --- /dev/null +++ b/scripts/split-tox-gh-actions/ci-yaml-test-latest-snippet.txt @@ -0,0 +1,39 @@ + test-latest: + name: {{ framework }} latest, python ${{ matrix.python-version }}, ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 +{{ strategy_matrix_latest }} +{{ services_latest }} + + 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-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 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..eada70db54 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,10 +82,18 @@ def write_yaml_file( template, current_framework, python_versions, + 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") @@ -105,6 +114,19 @@ def write_yaml_file( else: template.pop(test_py27_loc) + test_latest_loc = template.index("{{ test_latest }}\n") + if python_versions_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: @@ -115,13 +137,22 @@ def write_yaml_file( ) out += m - elif template_line.strip() == "{{ services }}": + 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() 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() ] @@ -198,7 +229,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) + python_versions = defaultdict(set) + python_versions_latest = defaultdict(set) print("Parse tox.ini envlist") @@ -213,22 +245,30 @@ 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 ( + 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: + python_versions_latest[framework] |= raw_python_versions + else: + python_versions[framework] |= raw_python_versions 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], + python_versions_latest[framework], + ) if fail_on_changes: new_hash = get_yaml_files_hash() diff --git a/tests/conftest.py b/tests/conftest.py index 5b0f1a8493..44ee18b4ee 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -602,3 +602,21 @@ def create_mock_http_server(): mock_server_thread.start() return mock_server_port + + +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 AttributeError: + content, status, headers = response + return b"".join(content), status, 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: + client.set_cookie(key, value) 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") ) diff --git a/tests/integrations/chalice/test_chalice.py b/tests/integrations/chalice/test_chalice.py index 4162a55623..fbd4be4e59 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 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 @@ -65,12 +66,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 +109,32 @@ def every_hour(event): assert str(exc_info.value) == "schedule event!" -def test_bad_reques(client: RequestHandler) -> None: +@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") 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.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") + + assert response.status_code == 400 + assert response.json == { + "Code": "BadRequestError", + "Message": "bad-request", + } @pytest.mark.parametrize( diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index a323d8c922..095657fd8a 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 unpack_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 = unpack_werkzeug_response(client.get(reverse("message"))) + + assert content == b"ok" (event,) = events assert event["transaction"] == "/message" @@ -154,7 +156,9 @@ 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 = unpack_werkzeug_response( + client.head(reverse("classbased")) + ) assert status.lower() == "200 ok" (event,) = events @@ -276,13 +280,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 = unpack_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 = unpack_werkzeug_response(client.get(reverse("message"))) + assert content == b"ok" (event,) = events @@ -319,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 = client.post("/404") + content, status, headers = unpack_werkzeug_response(client.post("/404")) assert status.lower() == "404 not found" (event,) = events @@ -339,9 +343,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 = unpack_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 +441,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 = unpack_werkzeug_response( + client.get(reverse("rest_json_response")) + ) assert status == "200 OK" assert ( @@ -571,7 +577,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 = unpack_werkzeug_response( + client.get(reverse("postgres_select")) + ) assert status == "200 OK" (event,) = events @@ -638,7 +646,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 = unpack_werkzeug_response( + client.get(reverse("postgres_select")) + ) assert status == "200 OK" (event,) = events @@ -705,8 +715,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 = unpack_werkzeug_response(client.get(client_url)) + assert content == expected_response (event,) = events assert event["transaction"] == expected_transaction @@ -716,11 +726,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 = unpack_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 +742,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 = unpack_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 +762,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 = unpack_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 +781,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, _, _ = unpack_werkzeug_response(client.get(reverse("template_test3"))) + rendered_meta = content.decode("utf-8") traceparent, baggage = events[0]["message"].split("\n") assert traceparent != "" @@ -793,7 +807,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 = unpack_werkzeug_response( + client.get(reverse("template_exc")) + ) assert status.lower() == "500 internal server error" (event,) = events @@ -881,7 +897,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, _ = unpack_werkzeug_response(client.get(reverse(endpoint))) assert status.lower() == "403 forbidden" assert not events @@ -1027,23 +1043,33 @@ def test_csrf(sentry_init, client): sentry_init(integrations=[DjangoIntegration()]) - content, status, _headers = client.post(reverse("csrf_hello_not_exempt")) + content, status, _headers = unpack_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 = unpack_werkzeug_response( + client.post(reverse("sentryclass_csrf")) + ) assert status.lower() == "403 forbidden" - content, status, _headers = client.post(reverse("sentryclass")) + content, status, _headers = unpack_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 = unpack_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 = unpack_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 +1088,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 = unpack_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 = unpack_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 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() 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 diff --git a/tests/integrations/rq/test_rq.py b/tests/integrations/rq/test_rq.py index 270a92e295..b0d71e8f7d 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,19 +15,23 @@ @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", ): - monkeypatch.setattr(k, lambda _: StrictVersion("4.0.0")) + 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 def crashing_job(foo): @@ -249,7 +254,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/tests/integrations/sanic/test_sanic.py b/tests/integrations/sanic/test_sanic.py index 1f6717a923..b338a5e6fb 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 @@ -14,6 +15,16 @@ from sanic.response import HTTPResponse from sanic.exceptions import SanicException +try: + from sanic_testing import TestManager +except ImportError: + TestManager = None + +try: + from sanic_testing.reusable import ReusableClient +except ImportError: + ReusableClient = None + from sentry_sdk._types import TYPE_CHECKING if TYPE_CHECKING: @@ -43,33 +54,49 @@ def new_test_client(self): 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") + if TestManager is not None: + 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 + c = get_client(app) + with c as client: + _, response = client.get("/message?foo=bar") + assert response.status == 200 (event,) = events assert event["transaction"] == "hi" @@ -106,8 +133,10 @@ def test_transaction_name( sentry_init(integrations=[SanicIntegration()]) events = capture_events() - request, response = app.test_client.get(url) - assert response.status == 200 + c = get_client(app) + with c as client: + _, response = client.get(url) + assert response.status == 200 (event,) = events assert event["transaction"] == expected_transaction @@ -122,8 +151,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 + c = get_client(app) + with c as client: + _, response = client.get("/error") + assert response.status == 500 (event,) = events assert event["transaction"] == "myerror" @@ -145,8 +176,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 + c = get_client(app) + with c as client: + _, response = client.get("/") + assert response.status == 400 assert not events @@ -163,8 +196,10 @@ def myerror(request): def myhandler(request, exception): 1 / 0 - request, response = app.test_client.get("/error") - assert response.status == 500 + c = get_client(app) + with c as client: + _, response = client.get("/error") + assert response.status == 500 event1, event2 = events @@ -194,7 +229,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/") @@ -380,8 +414,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 + c = get_client(app) + with c as 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 = [ 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 4994c417b9..46477750e9 100644 --- a/tox.ini +++ b/tox.ini @@ -17,22 +17,29 @@ 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.5} - {py3.7,py3.8,py3.9,py3.10,py3.11}-aiohttp-v{3.6} + {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}-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}-asyncpg-v{0.23} + {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 @@ -41,61 +48,69 @@ envlist = {py3.9}-aws_lambda # Beam - {py3.7}-beam-v{2.12,2.13,2.32,2.33} + {py3.7}-beam-v{2.12} + {py3.8,py3.9,py3.10,py3.11}-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}-boto3-v{1.12} + {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,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} + {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} + {py3.6,py3.7,py3.8,py3.9}-chalice-v{1.16} + {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.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,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} # - 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.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.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}-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 # Gevent {py2.7,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11}-gevent @@ -104,26 +119,32 @@ 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} - {py3.7,py3.8,py3.9,py3.10,py3.11}-grpc-v{1.54,1.56,1.58} - {py3.12}-grpc-v{1.59} + # gRPC + {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.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-2 + {py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-huey-v{2.0} + {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 @@ -135,58 +156,77 @@ 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,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} + {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 # 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}-rq-v{1.5,1.10} + {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,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.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 + {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 - {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 = @@ -208,18 +248,22 @@ deps = {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common: pytest<7.0.0 # AIOHTTP - aiohttp-v3.4: aiohttp>=3.4.0,<3.5.0 - aiohttp-v3.5: aiohttp>=3.5.0,<3.6.0 + aiohttp-v3.4: aiohttp~=3.4.0 + aiohttp-v3.8: aiohttp~=3.8.0 + aiohttp-latest: aiohttp aiohttp: pytest-aiohttp # Ariadne - ariadne: ariadne>=0.20 + ariadne-v0.20: ariadne~=0.20.0 + ariadne-latest: ariadne ariadne: fastapi ariadne: flask ariadne: httpx # Arq - arq: arq>=0.23.0 + 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 arq: async-timeout @@ -229,123 +273,110 @@ deps = asgi: async-asgi-testclient # Asyncpg + asyncpg-v0.23: asyncpg~=0.23.0 + asyncpg-latest: asyncpg asyncpg: pytest-asyncio - asyncpg: asyncpg # AWS Lambda 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-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 - 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 {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-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 - - 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{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 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-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 + 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 + django-v5.0: Django==5.0rc1 + django-latest: Django # 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{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 + 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 @@ -361,47 +392,55 @@ deps = {py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest<7.0.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-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 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-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 - 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 + # 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 # 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 @@ -411,19 +450,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 @@ -432,72 +471,53 @@ 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-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 - 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}: 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 + 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 - 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 + sanic-v{22,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 + sanic-v20: sanic~=20.0 + sanic-v22: sanic~=22.0 + sanic-v23: sanic~=23.0 + sanic-latest: sanic # Starlette starlette: pytest-asyncio @@ -506,11 +526,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 @@ -518,32 +539,38 @@ 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.48}: starlite~=1.48.0 + 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-v{4.6,4.8,5.0,5.2,5.4}: werkzeug<2.0 + trytond-v4: trytond~=4.0 + trytond-v5: trytond~=5.0 + trytond-v6: trytond~=6.0 + trytond-v7: trytond~=7.0 + trytond-latest: trytond + + trytond-v{4}: werkzeug<1.0 + trytond-v{5,6,7}: werkzeug<2.0 + trytond-latest: werkzeug<2.0 setenv = PYTHONDONTWRITEBYTECODE=1