diff --git a/.github/workflows/instrumentations_1.yml b/.github/workflows/instrumentations_1.yml index 0640c056a6..978642a7a3 100644 --- a/.github/workflows/instrumentations_1.yml +++ b/.github/workflows/instrumentations_1.yml @@ -25,7 +25,7 @@ jobs: python-version: [py38, py39, py310, py311, pypy3] package: - "urllib" - - "urllib3v" + - "urllib3" - "wsgi" - "distro" - "richconsole" 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..730ef16977 --- /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..1f10502f57 --- /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 b59ee8d21b..d7c30a8e7b 100644 --- a/tox.ini +++ b/tox.ini @@ -110,8 +110,12 @@ envlist = pypy3-test-instrumentation-urllib ; opentelemetry-instrumentation-urllib3 - py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2} - pypy3-test-instrumentation-urllib3v-{1,2} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: urllib3 >=1.0.0,<2.0.0 + ; 1: urllib3 >=2.0.0,<3.0.0 + 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 @@ -300,8 +304,6 @@ deps = pymemcache-300: pymemcache >3.0.0,<3.4.2 pymemcache-342: pymemcache ==3.4.2 pymemcache-400: pymemcache ==4.0.0 - 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 @@ -341,8 +343,6 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http - wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -364,7 +364,8 @@ commands_pre = urllib: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt - 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-1.txt botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] @@ -479,7 +480,7 @@ commands = test-instrumentation-fastapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/tests {posargs} test-instrumentation-flask: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs} test-instrumentation-urllib: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/tests {posargs} - test-instrumentation-urllib3v: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} + test-instrumentation-urllib3: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} test-instrumentation-grpc: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/tests {posargs} test-instrumentation-jinja2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2/tests {posargs} test-instrumentation-kafka-python: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/tests {posargs} @@ -591,7 +592,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt 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