From cea696424d02338291820046df4cf88de8780b16 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Tue, 27 Feb 2024 23:19:04 -0600 Subject: [PATCH] Remove [test] package from psycopg2 instrumentation Fixes #2210 --- .../pyproject.toml | 4 ---- .../test-requirements.txt | 19 +++++++++++++++++++ tox.ini | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml b/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml index a300fa9fdd..26873924e4 100644 --- a/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml @@ -33,10 +33,6 @@ dependencies = [ instruments = [ "psycopg2 >= 2.7.3.1", ] -test = [ - "opentelemetry-instrumentation-psycopg2[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] psycopg2 = "opentelemetry.instrumentation.psycopg2:Psycopg2Instrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt new file mode 100644 index 0000000000..55d44df897 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +psycopg2==2.9.9 +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 +wrapt==1.16.0 +zipp==3.17.0 +-e ../../../opentelemetry-instrumentation +-e ../../../instrumentation/opentelemetry-instrumentation-dbapi +-e ../../../instrumentation/opentelemetry-instrumentation-psycopg2 diff --git a/tox.ini b/tox.ini index 820ac93816..4ab710708e 100644 --- a/tox.ini +++ b/tox.ini @@ -432,7 +432,7 @@ commands_pre = psycopg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg[test] - psycopg2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] + psycopg2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt pymysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] @@ -563,7 +563,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] + python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2 python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test] @@ -611,7 +611,7 @@ deps = # see https://www.psycopg.org/docs/install.html#build-prerequisites # you might have to install additional packages depending on your OS psycopg ~= 3.1.17 - psycopg2 ~= 2.9.5 + psycopg2==2.9.9 aiopg >= 0.13.0, < 1.3.0 sqlalchemy ~= 1.4 redis ~= 4.3