Remove [test] package from urllib3 instrumentation (#2316)

Fixes #2226
This commit is contained in:
Diego Hurtado
2024-03-15 14:49:03 -06:00
committed by GitHub
parent 74820251f1
commit e30dd1abeb
5 changed files with 51 additions and 15 deletions

View File

@ -25,7 +25,7 @@ jobs:
python-version: [py38, py39, py310, py311, pypy3]
package:
- "urllib"
- "urllib3v"
- "urllib3"
- "wsgi"
- "distro"
- "richconsole"

View File

@ -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"

View File

@ -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

View File

@ -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

19
tox.ini
View File

@ -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