Skip to content

Commit

Permalink
Requirements: upgrade psycopg to v3 (#11432)
Browse files Browse the repository at this point in the history
We attempt to upgrade this some time ago (in #10667) but we reverted it later
since New Relic Python client wasn't compatible with it.

The newer version of New Relic that we are already using added compatibility and
should log database transactions properly now.

Closes #10596
  • Loading branch information
humitos authored Jun 20, 2024
1 parent 1216e99 commit 6a2c9ad
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
12 changes: 11 additions & 1 deletion requirements/deploy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,16 @@ prompt-toolkit==3.0.47
# -r requirements/pip.txt
# click-repl
# ipython
psycopg2==2.9.9
psycopg[binary,pool]==3.1.19
# via -r requirements/pip.txt
psycopg-binary==3.1.19
# via
# -r requirements/pip.txt
# psycopg
psycopg-pool==3.2.2
# via
# -r requirements/pip.txt
# psycopg
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
Expand Down Expand Up @@ -404,6 +412,8 @@ typing-extensions==4.12.2
# asgiref
# elasticsearch-dsl
# ipython
# psycopg
# psycopg-pool
tzdata==2024.1
# via
# -r requirements/pip.txt
Expand Down
3 changes: 0 additions & 3 deletions requirements/docker.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

-r pip.txt

# https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
psycopg2-binary

# run tests
tox

Expand Down
14 changes: 11 additions & 3 deletions requirements/docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,16 @@ prompt-toolkit==3.0.47
# -r requirements/pip.txt
# click-repl
# ipython
psycopg2==2.9.9
psycopg[binary,pool]==3.1.19
# via -r requirements/pip.txt
psycopg2-binary==2.9.9
# via -r requirements/docker.in
psycopg-binary==3.1.19
# via
# -r requirements/pip.txt
# psycopg
psycopg-pool==3.2.2
# via
# -r requirements/pip.txt
# psycopg
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
Expand Down Expand Up @@ -438,6 +444,8 @@ typing-extensions==4.12.2
# asgiref
# elasticsearch-dsl
# ipython
# psycopg
# psycopg-pool
tzdata==2024.1
# via
# -r requirements/pip.txt
Expand Down
5 changes: 2 additions & 3 deletions requirements/pip.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ django-extensions
django-polymorphic
django-autoslug

# NOTE: we cannot use ``psycopg`` (3.x), even if it's supported by Django 4.2
# because New Relic agent is not sending the data of the database to their servers.
psycopg2
# https://www.psycopg.org/psycopg3/docs/basic/install.html
psycopg[binary,pool]

# 3.1.0 includes changes that require running `makemigrations`
# https://django-simple-history.readthedocs.io/en/latest/#changes
Expand Down
8 changes: 7 additions & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,12 @@ platformdirs==4.2.2
# via virtualenv
prompt-toolkit==3.0.47
# via click-repl
psycopg2==2.9.9
psycopg[binary,pool]==3.1.19
# via -r requirements/pip.in
psycopg-binary==3.1.19
# via psycopg
psycopg-pool==3.2.2
# via psycopg
pycparser==2.22
# via cffi
pygments==2.18.0
Expand Down Expand Up @@ -288,6 +292,8 @@ typing-extensions==4.12.2
# via
# asgiref
# elasticsearch-dsl
# psycopg
# psycopg-pool
tzdata==2024.1
# via
# -r requirements/pip.in
Expand Down
12 changes: 11 additions & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,16 @@ prompt-toolkit==3.0.47
# via
# -r requirements/pip.txt
# click-repl
psycopg2==2.9.9
psycopg[binary,pool]==3.1.19
# via -r requirements/pip.txt
psycopg-binary==3.1.19
# via
# -r requirements/pip.txt
# psycopg
psycopg-pool==3.2.2
# via
# -r requirements/pip.txt
# psycopg
pycparser==2.22
# via
# -r requirements/pip.txt
Expand Down Expand Up @@ -434,6 +442,8 @@ typing-extensions==4.12.2
# -r requirements/pip.txt
# asgiref
# elasticsearch-dsl
# psycopg
# psycopg-pool
tzdata==2024.1
# via
# -r requirements/pip.txt
Expand Down

0 comments on commit 6a2c9ad

Please sign in to comment.