# Tox (http://codespeak.net/~hpk/tox/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] envlist = # === Core === py{2.7,3.4,3.5,3.6,3.7,3.8,3.9,3.10} pypy # === Integrations === # General format is {pythonversion}-{integrationname}-{frameworkversion} # 1 blank line between different integrations # Each framework version should only be mentioned once. I.e: # {py3.7,py3.10}-django-{3.2} # {py3.10}-django-{4.0} # instead of: # {py3.7}-django-{3.2} # {py3.7,py3.10}-django-{3.2,4.0} {pypy,py2.7,py3.5}-django-{1.8,1.9,1.10} {pypy,py2.7}-django-{1.8,1.9,1.10,1.11} {py3.5,py3.6,py3.7}-django-{2.0,2.1} {py3.7,py3.8,py3.9,py3.10}-django-{2.2,3.0,3.1,3.2} {pypy,py2.7,py3.4,py3.5,py3.6,py3.7,py3.8,py3.9}-flask-{0.10,0.11,0.12,1.0} {pypy,py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-flask-1.1 {py3.6,py3.8,py3.9,py3.10}-flask-2.0 {py3.7,py3.8,py3.9,py3.10}-quart {pypy,py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-bottle-0.12 {pypy,py2.7,py3.5,py3.6,py3.7}-falcon-1.4 {pypy,py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-falcon-2.0 {py3.5,py3.6,py3.7}-sanic-{0.8,18} {py3.6,py3.7}-sanic-19 {py3.6,py3.7,py3.8}-sanic-20 {py3.7,py3.8,py3.9,py3.10}-sanic-21 {pypy,py2.7}-celery-3 {pypy,py2.7,py3.5,py3.6}-celery-{4.1,4.2} {pypy,py2.7,py3.5,py3.6,py3.7,py3.8}-celery-{4.3,4.4} {py3.6,py3.7,py3.8,py3.9,py3.10}-celery-5.0 py3.7-beam-{2.12,2.13,2.32,2.33} # The aws_lambda tests deploy to the real AWS and have their own matrix of Python versions. py3.7-aws_lambda py3.7-gcp {pypy,py2.7,py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-pyramid-{1.6,1.7,1.8,1.9,1.10} {pypy,py2.7,py3.5,py3.6}-rq-{0.6,0.7,0.8,0.9,0.10,0.11} {pypy,py2.7,py3.5,py3.6,py3.7,py3.8,py3.9}-rq-{0.12,0.13,1.0,1.1,1.2,1.3} {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-rq-{1.4,1.5} py3.7-aiohttp-3.5 {py3.7,py3.8,py3.9,py3.10}-aiohttp-3.6 {py3.7,py3.8,py3.9}-tornado-{5} {py3.7,py3.8,py3.9,py3.10}-tornado-{6} {py3.5,py3.6,py3.7,py3.8,py3.9}-trytond-{4.6,5.0,5.2} {py3.6,py3.7,py3.8,py3.9,py3.10}-trytond-{5.4} {py2.7,py3.8,py3.9}-requests {py2.7,py3.7,py3.8,py3.9}-redis {py2.7,py3.7,py3.8,py3.9}-rediscluster-{1,2} py{3.7,3.8,3.9,3.10}-asgi {py2.7,py3.7,py3.8,py3.9,py3.10}-sqlalchemy-{1.2,1.3} {py3.5,py3.6,py3.7,py3.8,py3.9,py3.10}-pure_eval {py3.6,py3.7,py3.8}-chalice-{1.16,1.17,1.18,1.19,1.20} {py2.7,py3.6,py3.7,py3.8}-boto3-{1.9,1.10,1.11,1.12,1.13,1.14,1.15,1.16} {py3.6,py3.7,py3.8,py3.9,py3.10}-httpx-{0.16,0.17} [testenv] deps = # if you change test-requirements.txt and your change is not being reflected # in what's installed by tox (when running tox locally), try running tox # with the -r flag -r test-requirements.txt py3.4: colorama==0.4.1 py3.4: watchdog==0.10.7 django-{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}-django-{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: channels>2 {py3.7,py3.8,py3.9,py3.10}-django-{1.11,2.0,2.1,2.2,3.0,3.1,3.2}: pytest-asyncio {py2.7,py3.7,py3.8,py3.9,py3.10}-django-{1.11,2.2,3.0,3.1,3.2}: psycopg2-binary django-{1.8,1.9,1.10,1.11,2.0,2.1}: pytest-django<4.0 django-{2.2,3.0,3.1,3.2}: pytest-django>=4.0 django-{2.2,3.0,3.1,3.2}: Werkzeug<2.0 django-1.8: Django>=1.8,<1.9 django-1.9: Django>=1.9,<1.10 django-1.10: Django>=1.10,<1.11 django-1.11: Django>=1.11,<1.12 django-2.0: Django>=2.0,<2.1 django-2.1: Django>=2.1,<2.2 django-2.2: Django>=2.2,<2.3 django-3.0: Django>=3.0,<3.1 django-3.1: Django>=3.1,<3.2 django-3.2: Django>=3.2,<3.3 flask: flask-login flask-0.10: Flask>=0.10,<0.11 flask-0.11: Flask>=0.11,<0.12 flask-0.12: Flask>=0.12,<0.13 flask-1.0: Flask>=1.0,<1.1 flask-1.1: Flask>=1.1,<1.2 flask-2.0: Flask>=2.0,<2.1 quart: quart>=0.16.1 quart: quart-auth quart: pytest-asyncio bottle-0.12: bottle>=0.12,<0.13 falcon-1.4: falcon>=1.4,<1.5 falcon-2.0: falcon>=2.0.0rc3,<3.0 sanic-0.8: sanic>=0.8,<0.9 sanic-18: sanic>=18.0,<19.0 sanic-19: sanic>=19.0,<20.0 sanic-20: sanic>=20.0,<21.0 sanic-21: sanic>=21.0,<22.0 {py3.7,py3.8,py3.9,py3.10}-sanic-21: sanic_testing {py3.5,py3.6}-sanic: aiocontextvars==0.2.1 sanic: aiohttp py3.5-sanic: ujson<4 beam-2.12: apache-beam>=2.12.0, <2.13.0 beam-2.13: apache-beam>=2.13.0, <2.14.0 beam-2.32: apache-beam>=2.32.0, <2.33.0 beam-2.33: apache-beam>=2.33.0, <2.34.0 beam-master: git+https://github.com/apache/beam#egg=apache-beam&subdirectory=sdks/python celery: redis celery-3: Celery>=3.1,<4.0 celery-4.1: Celery>=4.1,<4.2 celery-4.2: Celery>=4.2,<4.3 celery-4.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-4.4: Celery>=4.4,<4.5,!=4.4.4 celery-5.0: Celery>=5.0,<5.1 py3.5-celery: newrelic<6.0.0 {pypy,py2.7,py3.6,py3.7,py3.8,py3.9,py3.10}-celery: newrelic requests: requests>=2.0 aws_lambda: boto3 pyramid-1.6: pyramid>=1.6,<1.7 pyramid-1.7: pyramid>=1.7,<1.8 pyramid-1.8: pyramid>=1.8,<1.9 pyramid-1.9: pyramid>=1.9,<1.10 pyramid-1.10: pyramid>=1.10,<1.11 # https://github.com/jamesls/fakeredis/issues/245 rq-{0.6,0.7,0.8,0.9,0.10,0.11,0.12}: fakeredis<1.0 rq-{0.6,0.7,0.8,0.9,0.10,0.11,0.12}: redis<3.2.2 rq-{0.13,1.0,1.1,1.2,1.3,1.4,1.5}: fakeredis>=1.0 rq-0.6: rq>=0.6,<0.7 rq-0.7: rq>=0.7,<0.8 rq-0.8: rq>=0.8,<0.9 rq-0.9: rq>=0.9,<0.10 rq-0.10: rq>=0.10,<0.11 rq-0.11: rq>=0.11,<0.12 rq-0.12: rq>=0.12,<0.13 rq-0.13: rq>=0.13,<0.14 rq-1.0: rq>=1.0,<1.1 rq-1.1: rq>=1.1,<1.2 rq-1.2: rq>=1.2,<1.3 rq-1.3: rq>=1.3,<1.4 rq-1.4: rq>=1.4,<1.5 rq-1.5: rq>=1.5,<1.6 aiohttp-3.4: aiohttp>=3.4.0,<3.5.0 aiohttp-3.5: aiohttp>=3.5.0,<3.6.0 aiohttp: pytest-aiohttp tornado-5: tornado>=5,<6 tornado-6: tornado>=6.0a1 trytond-5.4: trytond>=5.4,<5.5 trytond-5.2: trytond>=5.2,<5.3 trytond-5.0: trytond>=5.0,<5.1 trytond-4.6: trytond>=4.6,<4.7 trytond-{4.6,4.8,5.0,5.2,5.4}: werkzeug<2.0 redis: fakeredis rediscluster-1: redis-py-cluster>=1.0.0,<2.0.0 rediscluster-2: redis-py-cluster>=2.0.0,<3.0.0 asgi: starlette asgi: requests asgi: fastapi sqlalchemy-1.2: sqlalchemy>=1.2,<1.3 sqlalchemy-1.3: sqlalchemy>=1.3,<1.4 linters: -r linter-requirements.txt py3.8: hypothesis pure_eval: pure_eval chalice-1.16: chalice>=1.16.0,<1.17.0 chalice-1.17: chalice>=1.17.0,<1.18.0 chalice-1.18: chalice>=1.18.0,<1.19.0 chalice-1.19: chalice>=1.19.0,<1.20.0 chalice-1.20: chalice>=1.20.0,<1.21.0 chalice: pytest-chalice==0.0.5 boto3-1.9: boto3>=1.9,<1.10 boto3-1.10: boto3>=1.10,<1.11 boto3-1.11: boto3>=1.11,<1.12 boto3-1.12: boto3>=1.12,<1.13 boto3-1.13: boto3>=1.13,<1.14 boto3-1.14: boto3>=1.14,<1.15 boto3-1.15: boto3>=1.15,<1.16 boto3-1.16: boto3>=1.16,<1.17 httpx-0.16: httpx>=0.16,<0.17 httpx-0.17: httpx>=0.17,<0.18 setenv = PYTHONDONTWRITEBYTECODE=1 TESTPATH=tests beam: TESTPATH=tests/integrations/beam django: TESTPATH=tests/integrations/django flask: TESTPATH=tests/integrations/flask quart: TESTPATH=tests/integrations/quart bottle: TESTPATH=tests/integrations/bottle falcon: TESTPATH=tests/integrations/falcon celery: TESTPATH=tests/integrations/celery requests: TESTPATH=tests/integrations/requests aws_lambda: TESTPATH=tests/integrations/aws_lambda gcp: TESTPATH=tests/integrations/gcp sanic: TESTPATH=tests/integrations/sanic pyramid: TESTPATH=tests/integrations/pyramid rq: TESTPATH=tests/integrations/rq aiohttp: TESTPATH=tests/integrations/aiohttp tornado: TESTPATH=tests/integrations/tornado trytond: TESTPATH=tests/integrations/trytond redis: TESTPATH=tests/integrations/redis rediscluster: TESTPATH=tests/integrations/rediscluster asgi: TESTPATH=tests/integrations/asgi sqlalchemy: TESTPATH=tests/integrations/sqlalchemy pure_eval: TESTPATH=tests/integrations/pure_eval chalice: TESTPATH=tests/integrations/chalice boto3: TESTPATH=tests/integrations/boto3 httpx: TESTPATH=tests/integrations/httpx COVERAGE_FILE=.coverage-{envname} passenv = SENTRY_PYTHON_TEST_AWS_ACCESS_KEY_ID SENTRY_PYTHON_TEST_AWS_SECRET_ACCESS_KEY SENTRY_PYTHON_TEST_AWS_IAM_ROLE SENTRY_PYTHON_TEST_POSTGRES_USER SENTRY_PYTHON_TEST_POSTGRES_PASSWORD SENTRY_PYTHON_TEST_POSTGRES_NAME usedevelop = True extras = flask: flask bottle: bottle falcon: falcon quart: quart basepython = py2.7: python2.7 py3.4: python3.4 py3.5: python3.5 py3.6: python3.6 py3.7: python3.7 py3.8: python3.8 py3.9: python3.9 py3.10: python3.10 # Python version is pinned here because flake8 actually behaves differently # depending on which version is used. You can patch this out to point to # some random Python 3 binary, but then you get guaranteed mismatches with # CI. Other tools such as mypy and black have options that pin the Python # version. linters: python3.9 pypy: pypy commands = ; https://github.com/pytest-dev/pytest/issues/5532 {py3.5,py3.6,py3.7,py3.8,py3.9}-flask-{0.10,0.11,0.12}: pip install pytest<5 {py3.6,py3.7,py3.8,py3.9}-flask-{0.11}: pip install Werkzeug<2 ; https://github.com/pallets/flask/issues/4455 {py3.7,py3.8,py3.9,py3.10}-flask-{0.11,0.12,1.0,1.1}: pip install "itsdangerous>=0.24,<2.0" "markupsafe<2.0.0" "jinja2<3.1.1" ; https://github.com/more-itertools/more-itertools/issues/578 py3.5-flask-{0.10,0.11,0.12}: pip install more-itertools<8.11.0 ; use old pytest for old Python versions: {py2.7,py3.4,py3.5}: pip install pytest-forked==1.1.3 py.test {env:TESTPATH} {posargs} [testenv:linters] commands = flake8 tests examples sentry_sdk black --check tests examples sentry_sdk mypy examples sentry_sdk