diff --git a/docs/use/databases.rst b/docs/use/databases.rst index dc463c1e..614ac5dc 100644 --- a/docs/use/databases.rst +++ b/docs/use/databases.rst @@ -122,15 +122,15 @@ Python `Python `__ is the programming language in which many OCDS tools are written. -Install the `psycopg2 `__ Python package. +Install the `psycopg `__ Python package. For security, remember to set ``sslmode`` to ``'require'``. .. code-block:: python - import psycopg2 + import psycopg - conn = psycopg2.connect( + conn = psycopg.connect( dbname='kingfisher_process', user='USER', password='PASSWORD', diff --git a/salt/kingfisher/collect/incremental.sls b/salt/kingfisher/collect/incremental.sls index 2e09a3b0..3c41ead8 100644 --- a/salt/kingfisher/collect/incremental.sls +++ b/salt/kingfisher/collect/incremental.sls @@ -1,7 +1,7 @@ {% from 'lib.sls' import create_user, set_cron_env %} include: - - python.psycopg2 + - python.psycopg - python_apps {% set entry = pillar.python_apps.kingfisher_collect %} diff --git a/salt/kingfisher/collect/init.sls b/salt/kingfisher/collect/init.sls index 9b9a65c1..54b3021b 100644 --- a/salt/kingfisher/collect/init.sls +++ b/salt/kingfisher/collect/init.sls @@ -3,7 +3,7 @@ include: - python.virtualenv - python.extensions # twisted - - python.psycopg2 + - python.psycopg {% set entry = pillar.kingfisher_collect %} {% set user = entry.user %} diff --git a/salt/kingfisher/summarize/init.sls b/salt/kingfisher/summarize/init.sls index 7c156350..4cafe4f4 100644 --- a/salt/kingfisher/summarize/init.sls +++ b/salt/kingfisher/summarize/init.sls @@ -1,7 +1,7 @@ {% from 'lib.sls' import create_user, set_cron_env %} include: - - python.psycopg2 + - python.psycopg - python_apps {% set entry = pillar.python_apps.kingfisher_summarize %} diff --git a/salt/python/psycopg2.sls b/salt/python/psycopg.sls similarity index 60% rename from salt/python/psycopg2.sls rename to salt/python/psycopg.sls index f3c2ca46..d9112da0 100644 --- a/salt/python/psycopg2.sls +++ b/salt/python/psycopg.sls @@ -1,8 +1,8 @@ include: - python -# https://www.psycopg.org/install/ -psycopg2: +# https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation +psycopg: pkg.installed: - pkgs: - python{{ salt['pillar.get']('python:version', 3) }}-dev