From fc4fdd1168e1751858321d98df3d2611e56a01a0 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 28 Feb 2024 15:25:12 -0600 Subject: [PATCH] Remove [test] package for django instrumentation Fixes #2198 --- .../pyproject.toml | 4 ---- .../test-requirements-0.txt | 22 ++++++++++++++++++ .../test-requirements-1.txt | 23 +++++++++++++++++++ .../test-requirements-2.txt | 23 +++++++++++++++++++ tox.ini | 23 +++++++++---------- 5 files changed, 79 insertions(+), 16 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt diff --git a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml index 50cc227e44..65be04cb69 100644 --- a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml @@ -38,10 +38,6 @@ asgi = [ instruments = [ "django >= 1.10", ] -test = [ - "opentelemetry-instrumentation-django[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] django = "opentelemetry.instrumentation.django:DjangoInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt new file mode 100644 index 0000000000..d5f1110421 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +Django==2.2.28 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +pytz==2024.1 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../util/opentelemetry-util-http +-e ../../../instrumentation/opentelemetry-instrumentation-wsgi +-e ../../../instrumentation/opentelemetry-instrumentation-django diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt new file mode 100644 index 0000000000..2bd711ffaf --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt @@ -0,0 +1,23 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +Django==3.2.24 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +pytz==2024.1 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../util/opentelemetry-util-http +-e ../../../instrumentation/opentelemetry-instrumentation-wsgi +-e ../../../instrumentation/opentelemetry-instrumentation-asgi +-e ../../../instrumentation/opentelemetry-instrumentation-django diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt new file mode 100644 index 0000000000..728b204ec8 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt @@ -0,0 +1,23 @@ +asgiref==3.7.2 +attrs==23.2.0 +backports.zoneinfo==0.2.1 +Deprecated==1.2.14 +Django==4.2.10 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../util/opentelemetry-util-http +-e ../../../instrumentation/opentelemetry-instrumentation-wsgi +-e ../../../instrumentation/opentelemetry-instrumentation-asgi +-e ../../../instrumentation/opentelemetry-instrumentation-django diff --git a/tox.ini b/tox.ini index 7b7b2a0710..c005c7d6fb 100644 --- a/tox.ini +++ b/tox.ini @@ -52,10 +52,10 @@ envlist = ; Only officially supported Python versions are tested for each Django ; major release. Updated list can be found at: ; https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django - py3{8,9}-test-instrumentation-django-2 - py3{8,9,10,11}-test-instrumentation-django-3 - py3{8,9,10,11}-test-instrumentation-django-4 - pypy3-test-instrumentation-django-{2,3} + py3{8,9}-test-instrumentation-django-0 + py3{8,9,10,11}-test-instrumentation-django-1 + py3{8,9,10,11}-test-instrumentation-django-2 + pypy3-test-instrumentation-django-{0,1} ; opentelemetry-instrumentation-dbapi py3{8,9,10,11}-test-instrumentation-dbapi @@ -255,9 +255,6 @@ deps = test: pytest-benchmark coverage: pytest coverage: pytest-cov - django-2: django~=2.0 - django-3: django~=3.0 - django-4: django>=4.0b1,<5.0 elasticsearch-2: elasticsearch-dsl>=2.0,<3.0 elasticsearch-2: elasticsearch>=2.0,<3.0 elasticsearch-5: elasticsearch-dsl>=5.0,<6.0 @@ -333,9 +330,9 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,asgi,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http - wsgi,falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] - asgi,django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test] + falcon-{1,2,3},flask-{213,220,300},pyramid,tornado,starlette,fastapi,aiohttp,asgi,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http + wsgi,falcon-{1,2,3},flask-{213,220,300},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + asgi,starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test] asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -360,7 +357,9 @@ commands_pre = dbapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] - django-{1,2,3,4}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test] + django-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt + django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt + django-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test] @@ -539,7 +538,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test] + python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-django python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test]