Skip to content

Commit 31d350c

Browse files
committed
Remove [test] package from sqlalchemy instrumentation
Fixes #2219
1 parent 8daa8ad commit 31d350c

File tree

4 files changed

+53
-14
lines changed

4 files changed

+53
-14
lines changed

instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ dependencies = [
3535
instruments = [
3636
"sqlalchemy",
3737
]
38-
test = [
39-
"opentelemetry-instrumentation-sqlalchemy[instruments]",
40-
"opentelemetry-sdk ~= 1.12",
41-
"pytest",
42-
]
4338

4439
[project.entry-points.opentelemetry_instrumentor]
4540
sqlalchemy = "opentelemetry.instrumentation.sqlalchemy:SQLAlchemyInstrumentor"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
asgiref==3.7.2
2+
attrs==23.2.0
3+
cffi==1.15.1
4+
Deprecated==1.2.14
5+
greenlet==0.4.13
6+
hpy==0.0.4.dev179+g9b5d200
7+
importlib-metadata==6.11.0
8+
iniconfig==2.0.0
9+
packaging==23.2
10+
pluggy==1.4.0
11+
py==1.11.0
12+
py-cpuinfo==9.0.0
13+
pytest==7.1.3
14+
pytest-benchmark==4.0.0
15+
readline==6.2.4.1
16+
SQLAlchemy==1.1.18
17+
tomli==2.0.1
18+
typing_extensions==4.10.0
19+
wrapt==1.16.0
20+
zipp==3.17.0
21+
-e opentelemetry-instrumentation
22+
-e instrumentation/opentelemetry-instrumentation-sqlalchemy
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
aiosqlite==0.20.0
2+
asgiref==3.7.2
3+
attrs==23.2.0
4+
Deprecated==1.2.14
5+
greenlet==3.0.3
6+
importlib-metadata==6.11.0
7+
iniconfig==2.0.0
8+
packaging==23.2
9+
pluggy==1.4.0
10+
py==1.11.0
11+
py-cpuinfo==9.0.0
12+
pytest==7.1.3
13+
pytest-benchmark==4.0.0
14+
SQLAlchemy==1.4.51
15+
tomli==2.0.1
16+
typing_extensions==4.10.0
17+
wrapt==1.16.0
18+
zipp==3.17.0
19+
-e opentelemetry-instrumentation
20+
-e instrumentation/opentelemetry-instrumentation-sqlalchemy

tox.ini

+11-9
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,12 @@ envlist =
172172
pypy3-test-instrumentation-grpc
173173

174174
; opentelemetry-instrumentation-sqlalchemy
175-
py3{8,9,10,11}-test-instrumentation-sqlalchemy-{14}
176-
pypy3-test-instrumentation-sqlalchemy-{11,14}
175+
; The numbers at the end of the environment names
176+
; below mean these dependencies are being used:
177+
; 0: sqlalchemy>=1.1,<1.2 aiosqlite
178+
; 1: sqlalchemy~=1.4
179+
py3{8,9,10,11}-test-instrumentation-sqlalchemy-{1}
180+
pypy3-test-instrumentation-sqlalchemy-{0,1}
177181

178182
; opentelemetry-instrumentation-redis
179183
py3{8,9,10,11}-test-instrumentation-redis
@@ -279,9 +283,6 @@ deps =
279283
flask-300: Flask >=3.0.0
280284
flask-300: Werkzeug >=3.0.0
281285
grpc: pytest-asyncio
282-
sqlalchemy-11: sqlalchemy>=1.1,<1.2
283-
sqlalchemy-14: aiosqlite
284-
sqlalchemy-14: sqlalchemy~=1.4
285286
sio-pika-0: pika>=0.12.0,<1.0.0
286287
sio-pika-1: pika>=1.0.0
287288
aio-pika-7: aio_pika~=7.2.0
@@ -349,7 +350,7 @@ changedir =
349350
test-instrumentation-remoulade: instrumentation/opentelemetry-instrumentation-remoulade/tests
350351
test-instrumentation-requests: instrumentation/opentelemetry-instrumentation-requests/tests
351352
test-instrumentation-sklearn: instrumentation/opentelemetry-instrumentation-sklearn/tests
352-
test-instrumentation-sqlalchemy-{11,14}: instrumentation/opentelemetry-instrumentation-sqlalchemy/tests
353+
test-instrumentation-sqlalchemy-{0,1}: instrumentation/opentelemetry-instrumentation-sqlalchemy/tests
353354
test-instrumentation-sqlite3: instrumentation/opentelemetry-instrumentation-sqlite3/tests
354355
test-instrumentation-starlette: instrumentation/opentelemetry-instrumentation-starlette/tests
355356
test-instrumentation-system-metrics: instrumentation/opentelemetry-instrumentation-system-metrics/tests
@@ -472,7 +473,8 @@ commands_pre =
472473

473474
sklearn: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn[test]
474475

475-
sqlalchemy-{11,14}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test]
476+
sqlalchemy-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt
477+
sqlalchemy-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt
476478

477479
elasticsearch-{2,5,6}: pip install {toxinidir}/opentelemetry-instrumentation[test] {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test]
478480

@@ -548,7 +550,7 @@ commands_pre =
548550
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test]
549551
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test]
550552
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
551-
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test]
553+
pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt
552554
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test]
553555
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]
554556
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pika[test]
@@ -613,7 +615,7 @@ deps =
613615
psycopg ~= 3.1.17
614616
psycopg2 ~= 2.9.5
615617
aiopg >= 0.13.0, < 1.3.0
616-
sqlalchemy ~= 1.4
618+
sqlalchemy==1.4.51
617619
redis ~= 4.3
618620
celery[pytest] >= 4.0, < 6.0
619621
protobuf~=3.13

0 commit comments

Comments
 (0)