From 84a59aefccf140727bd2bf48d2bf177f35bf76a2 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 28 Feb 2024 18:06:22 -0600 Subject: [PATCH] Remove [test] package from urllib3 instrumentation Fixes #2226 --- .../pyproject.toml | 5 ----- .../test-requirements-0.txt | 20 +++++++++++++++++++ .../test-requirements-1.txt | 20 +++++++++++++++++++ tox.ini | 15 +++++++------- 4 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml index fbd27f7bd8..628cb46554 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml @@ -35,11 +35,6 @@ dependencies = [ instruments = [ "urllib3 >= 1.0.0, < 3.0.0", ] -test = [ - "opentelemetry-instrumentation-urllib3[instruments]", - "httpretty ~= 1.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] urllib3 = "opentelemetry.instrumentation.urllib3:URLLib3Instrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt new file mode 100644 index 0000000000..add55e4b44 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +httpretty==1.1.4 +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 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==1.26.18 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../util/opentelemetry-util-http +-e ../../../instrumentation/opentelemetry-instrumentation-urllib3 diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt new file mode 100644 index 0000000000..06fc87fc79 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +httpretty==1.1.4 +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 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../util/opentelemetry-util-http +-e ../../../instrumentation/opentelemetry-instrumentation-urllib3 diff --git a/tox.ini b/tox.ini index 820ac93816..80b7df79ca 100644 --- a/tox.ini +++ b/tox.ini @@ -92,8 +92,8 @@ envlist = pypy3-test-instrumentation-urllib ; opentelemetry-instrumentation-urllib3 - py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2} - pypy3-test-instrumentation-urllib3v-{1,2} + py3{8,9,10,11}-test-instrumentation-urllib3-{0,1} + pypy3-test-instrumentation-urllib3-{0,1} ; opentelemetry-instrumentation-requests py3{8,9,10,11}-test-instrumentation-requests @@ -296,8 +296,6 @@ deps = httpx-18: respx~=0.17.0 httpx-21: httpx>=0.19.0 httpx-21: respx~=0.20.1 - urllib3v-1: urllib3 >=1.0.0,<2.0.0 - urllib3v-2: urllib3 >=2.0.0,<3.0.0 ; FIXME: add coverage testing ; FIXME: add mypy testing @@ -329,7 +327,7 @@ changedir = test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests test-instrumentation-flask-{213,220,300}: instrumentation/opentelemetry-instrumentation-flask/tests test-instrumentation-urllib: instrumentation/opentelemetry-instrumentation-urllib/tests - test-instrumentation-urllib3v-{1,2}: instrumentation/opentelemetry-instrumentation-urllib3/tests + test-instrumentation-urllib3-{0,1}: instrumentation/opentelemetry-instrumentation-urllib3/tests test-instrumentation-grpc: instrumentation/opentelemetry-instrumentation-grpc/tests test-instrumentation-jinja2: instrumentation/opentelemetry-instrumentation-jinja2/tests test-instrumentation-kafka-python: instrumentation/opentelemetry-instrumentation-kafka-python/tests @@ -391,7 +389,7 @@ 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 + falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,asgi,httpx-{18,21},requests,urllib,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] @@ -410,7 +408,8 @@ commands_pre = urllib: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] - urllib3v-{1,2}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] + urllib3-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt + urllib3-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] @@ -571,7 +570,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] + python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3 python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] # prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install # for your OS to install the required dependencies