Skip to content

Commit 0ebeee7

Browse files
committed
Remove [test] package from urllib3 instrumentation
Fixes open-telemetry#2226
1 parent 1e0b11f commit 0ebeee7

File tree

5 files changed

+51
-13
lines changed

5 files changed

+51
-13
lines changed

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

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

tox.ini

+10-7
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ envlist =
9292
pypy3-test-instrumentation-urllib
9393

9494
; opentelemetry-instrumentation-urllib3
95-
py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2}
96-
pypy3-test-instrumentation-urllib3v-{1,2}
95+
; The numbers at the end of the environment names
96+
; below mean these dependencies are being used:
97+
; 0: urllib3 >=1.0.0,<2.0.0
98+
; 1: urllib3 >=2.0.0,<3.0.0
99+
py3{8,9,10,11}-test-instrumentation-urllib3-{0,1}
100+
pypy3-test-instrumentation-urllib3-{0,1}
97101

98102
; opentelemetry-instrumentation-requests
99103
py3{8,9,10,11}-test-instrumentation-requests
@@ -296,8 +300,6 @@ deps =
296300
httpx-18: respx~=0.17.0
297301
httpx-21: httpx>=0.19.0
298302
httpx-21: respx~=0.20.1
299-
urllib3v-1: urllib3 >=1.0.0,<2.0.0
300-
urllib3v-2: urllib3 >=2.0.0,<3.0.0
301303

302304
; FIXME: add coverage testing
303305
; FIXME: add mypy testing
@@ -333,7 +335,7 @@ commands_pre =
333335

334336
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
335337

336-
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
338+
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
337339
wsgi,falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test]
338340
asgi,django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test]
339341

@@ -352,7 +354,8 @@ commands_pre =
352354

353355
urllib: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test]
354356

355-
urllib3v-{1,2}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test]
357+
urllib3-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
358+
urllib3-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
356359

357360
botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test]
358361

@@ -568,7 +571,7 @@ commands_pre =
568571
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test]
569572
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test]
570573
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test]
571-
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test]
574+
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
572575
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test]
573576
# prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install
574577
# for your OS to install the required dependencies

0 commit comments

Comments
 (0)