diff --git a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in index 406b9d412952f..6418dc1853bd2 100644 --- a/datadog_checks_base/datadog_checks/base/data/agent_requirements.in +++ b/datadog_checks_base/datadog_checks/base/data/agent_requirements.in @@ -56,7 +56,7 @@ prometheus-client==0.16.0; python_version > '3.0' protobuf==3.17.3; python_version < '3.0' protobuf==3.20.2; python_version > '3.0' psutil==5.9.0 -psycopg-binary==3.1.9; python_version > '3.0' +psycopg[binary]==3.1.9; python_version > '3.0' pyasn1==0.4.6 pycryptodomex==3.10.1 pydantic==1.10.8; python_version > '3.0' diff --git a/pgbouncer/pyproject.toml b/pgbouncer/pyproject.toml index cb97804d1b1ef..42270105a673f 100644 --- a/pgbouncer/pyproject.toml +++ b/pgbouncer/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" name = "datadog-pgbouncer" description = "The PGBouncer check" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" keywords = [ "datadog", "datadog agent", @@ -39,7 +39,7 @@ license = "BSD-3-Clause" [project.optional-dependencies] deps = [ - "psycopg-binary==3.1.9; python_version > '3.0'", + "psycopg[binary]==3.1.9; python_version > '3.0'", ] [project.urls] diff --git a/postgres/datadog_checks/postgres/statements.py b/postgres/datadog_checks/postgres/statements.py index 02f90ff43adca..c070d4979929f 100644 --- a/postgres/datadog_checks/postgres/statements.py +++ b/postgres/datadog_checks/postgres/statements.py @@ -363,7 +363,7 @@ def _emit_pg_stat_statements_dealloc(self): PG_STAT_STATEMENTS_DEALLOC, ) if rows: - dealloc = rows[0][0] + dealloc = rows[0]['count'] self._check.monotonic_count( "postgresql.pg_stat_statements.dealloc", dealloc, @@ -383,7 +383,7 @@ def _emit_pg_stat_statements_metrics(self): ) count = 0 if rows: - count = rows[0][0] + count = rows[0]['count'] self._check.gauge( "postgresql.pg_stat_statements.max", self._check.pg_settings.get("pg_stat_statements.max", 0), diff --git a/postgres/pyproject.toml b/postgres/pyproject.toml index ffa8dd545d927..b981c23049017 100644 --- a/postgres/pyproject.toml +++ b/postgres/pyproject.toml @@ -43,7 +43,7 @@ deps = [ "cachetools==3.1.1; python_version < '3.0'", "cachetools==5.3.0; python_version > '3.0'", "futures==3.4.0; python_version < '3.0'", - "psycopg-binary==3.1.9; python_version > '3.0'", + "psycopg[binary]==3.1.9; python_version > '3.0'", "semver==2.13.0", ]