From 63e7561931cd2d5e8edca9281c5156b9852eb348 Mon Sep 17 00:00:00 2001 From: "Ryan, Siu Long Wa" Date: Tue, 22 Jun 2021 22:47:34 +0800 Subject: [PATCH] Update the psycopg2 dependency (#543) --- CHANGELOG.md | 2 ++ .../src/opentelemetry/instrumentation/psycopg2/package.py | 2 +- .../src/opentelemetry/instrumentation/bootstrap_gen.py | 4 ++-- tox.ini | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de5ab27ec9..51c1880f66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#469](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/469)) - Implemented specification that HTTP span attributes must not contain username and password. ([#538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/538)) +- Changed the psycopg2-binary to psycopg2 as dependency in production + ([#543](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/543)) ### Added - `opentelemetry-instrumentation-httpx` Add `httpx` instrumentation diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/package.py b/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/package.py index 3b624696c8..9757a8df79 100644 --- a/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/package.py +++ b/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/package.py @@ -13,4 +13,4 @@ # limitations under the License. -_instruments = ("psycopg2-binary >= 2.7.3.1",) +_instruments = ("psycopg2 >= 2.7.3.1",) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index e5a3293c3b..5e747136a7 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -80,8 +80,8 @@ "library": "mysql-connector-python ~= 8.0", "instrumentation": "opentelemetry-instrumentation-mysql==0.23.dev0", }, - "psycopg2-binary": { - "library": "psycopg2-binary >= 2.7.3.1", + "psycopg2": { + "library": "psycopg2 >= 2.7.3.1", "instrumentation": "opentelemetry-instrumentation-psycopg2==0.23.dev0", }, "pymemcache": { diff --git a/tox.ini b/tox.ini index 2f918eb352..06504e4b1f 100644 --- a/tox.ini +++ b/tox.ini @@ -403,7 +403,7 @@ deps = mysql-connector-python ~= 8.0 pymongo ~= 3.1 PyMySQL ~= 0.10.1 - psycopg2-binary ~= 2.8.4 + psycopg2 ~= 2.8.4 aiopg >= 0.13.0 sqlalchemy ~= 1.3.16 redis ~= 3.3.11