Skip to content

Commit e30dd1a

Browse files
authored
Remove [test] package from urllib3 instrumentation (open-telemetry#2316)
Fixes open-telemetry#2226
1 parent 7482025 commit e30dd1a

File tree

5 files changed

+51
-15
lines changed

5 files changed

+51
-15
lines changed

Diff for: .github/workflows/instrumentations_1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
python-version: [py38, py39, py310, py311, pypy3]
2626
package:
2727
- "urllib"
28-
- "urllib3v"
28+
- "urllib3"
2929
- "wsgi"
3030
- "distro"
3131
- "richconsole"

Diff for: instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ dependencies = [
3535
instruments = [
3636
"urllib3 >= 1.0.0, < 3.0.0",
3737
]
38-
test = [
39-
"opentelemetry-instrumentation-urllib3[instruments]",
40-
"httpretty ~= 1.0",
41-
"opentelemetry-test-utils == 0.45b0.dev",
42-
]
4338

4439
[project.entry-points.opentelemetry_instrumentor]
4540
urllib3 = "opentelemetry.instrumentation.urllib3:URLLib3Instrumentor"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
asgiref==3.7.2
2+
attrs==23.2.0
3+
Deprecated==1.2.14
4+
httpretty==1.1.4
5+
importlib-metadata==6.11.0
6+
iniconfig==2.0.0
7+
packaging==23.2
8+
pluggy==1.4.0
9+
py==1.11.0
10+
py-cpuinfo==9.0.0
11+
pytest==7.1.3
12+
pytest-benchmark==4.0.0
13+
tomli==2.0.1
14+
typing_extensions==4.10.0
15+
urllib3==1.26.18
16+
wrapt==1.16.0
17+
zipp==3.17.0
18+
-e opentelemetry-instrumentation
19+
-e util/opentelemetry-util-http
20+
-e instrumentation/opentelemetry-instrumentation-urllib3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
asgiref==3.7.2
2+
attrs==23.2.0
3+
Deprecated==1.2.14
4+
httpretty==1.1.4
5+
importlib-metadata==6.11.0
6+
iniconfig==2.0.0
7+
packaging==23.2
8+
pluggy==1.4.0
9+
py==1.11.0
10+
py-cpuinfo==9.0.0
11+
pytest==7.1.3
12+
pytest-benchmark==4.0.0
13+
tomli==2.0.1
14+
typing_extensions==4.10.0
15+
urllib3==2.2.1
16+
wrapt==1.16.0
17+
zipp==3.17.0
18+
-e opentelemetry-instrumentation
19+
-e util/opentelemetry-util-http
20+
-e instrumentation/opentelemetry-instrumentation-urllib3

Diff for: tox.ini

+10-9
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ envlist =
110110
pypy3-test-instrumentation-urllib
111111

112112
; opentelemetry-instrumentation-urllib3
113-
py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2}
114-
pypy3-test-instrumentation-urllib3v-{1,2}
113+
; The numbers at the end of the environment names
114+
; below mean these dependencies are being used:
115+
; 0: urllib3 >=1.0.0,<2.0.0
116+
; 1: urllib3 >=2.0.0,<3.0.0
117+
py3{8,9,10,11}-test-instrumentation-urllib3-{0,1}
118+
pypy3-test-instrumentation-urllib3-{0,1}
115119

116120
; opentelemetry-instrumentation-requests
117121
py3{8,9,10,11}-test-instrumentation-requests
@@ -300,8 +304,6 @@ deps =
300304
pymemcache-300: pymemcache >3.0.0,<3.4.2
301305
pymemcache-342: pymemcache ==3.4.2
302306
pymemcache-400: pymemcache ==4.0.0
303-
urllib3v-1: urllib3 >=1.0.0,<2.0.0
304-
urllib3v-2: urllib3 >=2.0.0,<3.0.0
305307

306308
; FIXME: add coverage testing
307309
; FIXME: add mypy testing
@@ -341,8 +343,6 @@ commands_pre =
341343

342344
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
343345

344-
urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http
345-
346346
wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt
347347

348348
asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test]
@@ -364,7 +364,8 @@ commands_pre =
364364

365365
urllib: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt
366366

367-
urllib3v-{1,2}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test]
367+
urllib3-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
368+
urllib3-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
368369

369370
botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test]
370371

@@ -479,7 +480,7 @@ commands =
479480
test-instrumentation-fastapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/tests {posargs}
480481
test-instrumentation-flask: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs}
481482
test-instrumentation-urllib: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/tests {posargs}
482-
test-instrumentation-urllib3v: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs}
483+
test-instrumentation-urllib3: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs}
483484
test-instrumentation-grpc: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/tests {posargs}
484485
test-instrumentation-jinja2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2/tests {posargs}
485486
test-instrumentation-kafka-python: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/tests {posargs}
@@ -591,7 +592,7 @@ commands_pre =
591592
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt
592593
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt
593594
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt
594-
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test]
595+
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
595596
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test]
596597
# prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install
597598
# for your OS to install the required dependencies

0 commit comments

Comments
 (0)