Skip to content

Commit 9ce88fc

Browse files
committed
Remove [test] package from flask instrumentation
Fixes open-telemetry#2126
1 parent 2518a4a commit 9ce88fc

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

instrumentation/opentelemetry-instrumentation-flask/pyproject.toml

-6
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ dependencies = [
3434

3535
[project.optional-dependencies]
3636
instruments = [
37-
"werkzeug < 3.0.0",
3837
"flask >= 1.0",
3938
]
40-
test = [
41-
"opentelemetry-instrumentation-flask[instruments]",
42-
"markupsafe==2.1.2",
43-
"opentelemetry-test-utils == 0.44b0.dev",
44-
]
4539

4640
[project.entry-points.opentelemetry_instrumentor]
4741
flask = "opentelemetry.instrumentation.flask:FlaskInstrumentor"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flask==2.1.3
2+
werkzeug==2.3.8
3+
-e ../../../opentelemetry-instrumentation
4+
-e ../../../util/opentelemetry-util-http
5+
-e ../../../instrumentation/opentelemetry-instrumentation-wsgi
6+
-e ../../../instrumentation/opentelemetry-instrumentation-flask
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flask==2.2.0
2+
werkzeug==2.3.8
3+
-e ../../../opentelemetry-instrumentation
4+
-e ../../../util/opentelemetry-util-http
5+
-e ../../../instrumentation/opentelemetry-instrumentation-wsgi
6+
-e ../../../instrumentation/opentelemetry-instrumentation-flask
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flask==3.0.2
2+
werkzeug==3.0.1
3+
-e ../../../opentelemetry-instrumentation
4+
-e ../../../util/opentelemetry-util-http
5+
-e ../../../instrumentation/opentelemetry-instrumentation-wsgi
6+
-e ../../../instrumentation/opentelemetry-instrumentation-flask

opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py

-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@
8484
"library": "fastapi ~= 0.58",
8585
"instrumentation": "opentelemetry-instrumentation-fastapi==0.44b0.dev",
8686
},
87-
{
88-
"library": "werkzeug < 3.0.0",
89-
"instrumentation": "opentelemetry-instrumentation-flask==0.44b0.dev",
90-
},
9187
{
9288
"library": "flask >= 1.0",
9389
"instrumentation": "opentelemetry-instrumentation-flask==0.44b0.dev",

tox.ini

+10-14
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ envlist =
8383
pypy3-test-instrumentation-fastapi
8484

8585
; opentelemetry-instrumentation-flask
86-
py3{8,9,10,11}-test-instrumentation-flask-{213,220}
87-
py3{8,9,10,11}-test-instrumentation-flask-{300}
88-
pypy3-test-instrumentation-flask-{213,220}
86+
py3{8,9,10,11}-test-instrumentation-flask-{0,1}
87+
py3{8,9,10,11}-test-instrumentation-flask-{2}
88+
pypy3-test-instrumentation-flask-{0,1}
8989

9090
; opentelemetry-instrumentation-urllib
9191
py3{8,9,10,11}-test-instrumentation-urllib
@@ -268,12 +268,6 @@ deps =
268268
falcon-1: falcon ==1.4.1
269269
falcon-2: falcon >=2.0.0,<3.0.0
270270
falcon-3: falcon >=3.0.0,<4.0.0
271-
flask-213: Flask ==2.1.3
272-
flask-213: Werkzeug <3.0.0
273-
flask-220: Flask ==2.2.0
274-
flask-220: Werkzeug <3.0.0
275-
flask-300: Flask >=3.0.0
276-
flask-300: Werkzeug >=3.0.0
277271
grpc: pytest-asyncio
278272
sqlalchemy-11: sqlalchemy>=1.1,<1.2
279273
sqlalchemy-14: aiosqlite
@@ -323,7 +317,7 @@ changedir =
323317
test-instrumentation-elasticsearch-{2,5,6}: instrumentation/opentelemetry-instrumentation-elasticsearch/tests
324318
test-instrumentation-falcon-{1,2,3}: instrumentation/opentelemetry-instrumentation-falcon/tests
325319
test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests
326-
test-instrumentation-flask-{213,220,300}: instrumentation/opentelemetry-instrumentation-flask/tests
320+
test-instrumentation-flask-{0,1,2}: instrumentation/opentelemetry-instrumentation-flask/tests
327321
test-instrumentation-urllib: instrumentation/opentelemetry-instrumentation-urllib/tests
328322
test-instrumentation-urllib3v-{1,2}: instrumentation/opentelemetry-instrumentation-urllib3/tests
329323
test-instrumentation-grpc: instrumentation/opentelemetry-instrumentation-grpc/tests
@@ -386,8 +380,8 @@ commands_pre =
386380

387381
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
388382

389-
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
390-
wsgi,falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test]
383+
falcon-{1,2,3},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
384+
wsgi,falcon-{1,2,3},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test]
391385
asgi,django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test]
392386

393387
asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test]
@@ -401,7 +395,9 @@ commands_pre =
401395

402396
falcon-{1,2,3}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test]
403397

404-
flask-{213,220,300}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
398+
flask-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt
399+
flask-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt
400+
flask-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt
405401

406402
urllib: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test]
407403

@@ -540,7 +536,7 @@ commands_pre =
540536
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
541537
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test]
542538
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test]
543-
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
539+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
544540
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test]
545541
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test]
546542
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]

0 commit comments

Comments
 (0)