Skip to content

Commit

Permalink
Remove [test] package from urllib3 instrumentation
Browse files Browse the repository at this point in the history
Fixes #2226
  • Loading branch information
ocelotl committed Mar 15, 2024
1 parent 7482025 commit 0571870
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/instrumentations_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: [py38, py39, py310, py311, pypy3]
package:
- "urllib"
- "urllib3v"
- "urllib3"
- "wsgi"
- "distro"
- "richconsole"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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]

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0571870

Please sign in to comment.