From 80f339921a0df64c507fef5b83691d84333f857d Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 23 Feb 2024 19:49:13 -0600 Subject: [PATCH] Remove [test] package from pymysql instrumentation Fixes #2213 --- .../pyproject.toml | 4 ---- .../test-requirements.txt | 19 +++++++++++++++++++ tox.ini | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml index 4018d29601..9e6028bf64 100644 --- a/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml @@ -33,10 +33,6 @@ dependencies = [ instruments = [ "PyMySQL < 2", ] -test = [ - "opentelemetry-instrumentation-pymysql[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] pymysql = "opentelemetry.instrumentation.pymysql:PyMySQLInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt new file mode 100644 index 0000000000..cb6619c5de --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymysql/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 +py==1.11.0 +py-cpuinfo==9.0.0 +PyMySQL==1.1.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-dbapi +-e instrumentation/opentelemetry-instrumentation-pymysql diff --git a/tox.ini b/tox.ini index 7b7b2a0710..3675cee3e2 100644 --- a/tox.ini +++ b/tox.ini @@ -376,7 +376,7 @@ commands_pre = psycopg2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] - pymysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] + pymysql: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test] @@ -569,7 +569,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt # prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install # for your OS to install the required dependencies python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test]