Skip to content

Commit 9409f57

Browse files
authored
Requirements: revert upgrade to psycopg==3.x (#10713)
* Requirements: revert upgrade to `psycopg==3.x` This package works fine and the upgrade was transparent. However, it seems that New Relic agent is not prepared to collect data from v3.x and send it to their servers. https://docs.newrelic.com/docs/apm/agents/python-agent/getting-started/instrumented-python-packages/#instance-details > The Python agent should be able to track database queries for any Python > DB-API 2.0 compliant modules `psycopg3` is compatible with DB-API 2.0, but for some reason doesn't work. I'm reverting it for now and we can take a look later. Note this commit also upgrades Django, due to a security issue that was reported: https://docs.djangoproject.com/en/4.2/releases/4.2.5/ Reverts #10667 * Update packages
1 parent 9c2f41c commit 9409f57

File tree

7 files changed

+26
-56
lines changed

7 files changed

+26
-56
lines changed

requirements/deploy.txt

+4-14
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ billiard==3.6.4.0
2424
# via
2525
# -r requirements/pip.txt
2626
# celery
27-
boto3==1.28.44
27+
boto3==1.28.45
2828
# via
2929
# -r requirements/pip.txt
3030
# django-storages
31-
botocore==1.31.44
31+
botocore==1.31.45
3232
# via
3333
# -r requirements/pip.txt
3434
# boto3
@@ -265,16 +265,8 @@ prompt-toolkit==3.0.39
265265
# -r requirements/pip.txt
266266
# click-repl
267267
# ipython
268-
psycopg[binary,pool]==3.1.10
268+
psycopg2==2.9.7
269269
# via -r requirements/pip.txt
270-
psycopg-binary==3.1.10
271-
# via
272-
# -r requirements/pip.txt
273-
# psycopg
274-
psycopg-pool==3.1.7
275-
# via
276-
# -r requirements/pip.txt
277-
# psycopg
278270
ptyprocess==0.7.0
279271
# via pexpect
280272
pure-eval==0.2.2
@@ -385,8 +377,6 @@ typing-extensions==4.7.1
385377
# -r requirements/pip.txt
386378
# asgiref
387379
# filelock
388-
# psycopg
389-
# psycopg-pool
390380
tzdata==2023.3
391381
# via
392382
# -r requirements/pip.txt
@@ -423,7 +413,7 @@ wcwidth==0.2.6
423413
# via
424414
# -r requirements/pip.txt
425415
# prompt-toolkit
426-
websocket-client==1.6.2
416+
websocket-client==1.6.3
427417
# via
428418
# -r requirements/pip.txt
429419
# docker

requirements/docker.in

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
-r pip.txt
44

5+
# https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
6+
psycopg2-binary
7+
58
# run tests
69
tox
710

requirements/docker.txt

+6-14
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ billiard==3.6.4.0
2424
# via
2525
# -r requirements/pip.txt
2626
# celery
27-
boto3==1.28.44
27+
boto3==1.28.45
2828
# via
2929
# -r requirements/pip.txt
3030
# django-storages
31-
botocore==1.31.44
31+
botocore==1.31.45
3232
# via
3333
# -r requirements/pip.txt
3434
# boto3
@@ -288,16 +288,10 @@ prompt-toolkit==3.0.39
288288
# -r requirements/pip.txt
289289
# click-repl
290290
# ipython
291-
psycopg[binary,pool]==3.1.10
291+
psycopg2==2.9.7
292292
# via -r requirements/pip.txt
293-
psycopg-binary==3.1.10
294-
# via
295-
# -r requirements/pip.txt
296-
# psycopg
297-
psycopg-pool==3.1.7
298-
# via
299-
# -r requirements/pip.txt
300-
# psycopg
293+
psycopg2-binary==2.9.7
294+
# via -r requirements/docker.in
301295
ptyprocess==0.7.0
302296
# via pexpect
303297
pure-eval==0.2.2
@@ -416,8 +410,6 @@ typing-extensions==4.7.1
416410
# -r requirements/pip.txt
417411
# asgiref
418412
# filelock
419-
# psycopg
420-
# psycopg-pool
421413
tzdata==2023.3
422414
# via
423415
# -r requirements/pip.txt
@@ -455,7 +447,7 @@ wcwidth==0.2.6
455447
# via
456448
# -r requirements/pip.txt
457449
# prompt-toolkit
458-
websocket-client==1.6.2
450+
websocket-client==1.6.3
459451
# via
460452
# -r requirements/pip.txt
461453
# docker

requirements/docs.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ markdown-it-py==3.0.0
4949
# myst-parser
5050
markupsafe==2.1.3
5151
# via jinja2
52-
matplotlib==3.7.2
52+
matplotlib==3.7.3
5353
# via sphinxext-opengraph
5454
mdit-py-plugins==0.4.0
5555
# via myst-parser
@@ -74,7 +74,7 @@ pygments==2.16.1
7474
# sphinx
7575
# sphinx-prompt
7676
# sphinx-tabs
77-
pyparsing==3.0.9
77+
pyparsing==3.1.1
7878
# via matplotlib
7979
python-dateutil==2.8.2
8080
# via matplotlib

requirements/pip.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ django-extensions
77
django-polymorphic
88
django-autoslug
99

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

1314
# 3.1.0 includes changes that require running `makemigrations`
1415
# https://django-simple-history.readthedocs.io/en/latest/#changes

requirements/pip.txt

+4-10
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ async-timeout==4.0.3
1212
# via redis
1313
billiard==3.6.4.0
1414
# via celery
15-
boto3==1.28.44
15+
boto3==1.28.45
1616
# via django-storages
17-
botocore==1.31.44
17+
botocore==1.31.45
1818
# via
1919
# boto3
2020
# s3transfer
@@ -185,12 +185,8 @@ platformdirs==3.10.0
185185
# via virtualenv
186186
prompt-toolkit==3.0.39
187187
# via click-repl
188-
psycopg[binary,pool]==3.1.10
188+
psycopg2==2.9.7
189189
# via -r requirements/pip.in
190-
psycopg-binary==3.1.10
191-
# via psycopg
192-
psycopg-pool==3.1.7
193-
# via psycopg
194190
pycparser==2.21
195191
# via cffi
196192
pygments==2.16.1
@@ -268,8 +264,6 @@ typing-extensions==4.7.1
268264
# via
269265
# asgiref
270266
# filelock
271-
# psycopg
272-
# psycopg-pool
273267
tzdata==2023.3
274268
# via
275269
# -r requirements/pip.in
@@ -297,7 +291,7 @@ virtualenv==20.24.5
297291
# via -r requirements/pip.in
298292
wcwidth==0.2.6
299293
# via prompt-toolkit
300-
websocket-client==1.6.2
294+
websocket-client==1.6.3
301295
# via docker
302296

303297
# The following packages are considered to be unsafe in a requirements file:

requirements/testing.txt

+4-14
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ billiard==3.6.4.0
2424
# via
2525
# -r requirements/pip.txt
2626
# celery
27-
boto3==1.28.44
27+
boto3==1.28.45
2828
# via
2929
# -r requirements/pip.txt
3030
# django-storages
31-
botocore==1.31.44
31+
botocore==1.31.45
3232
# via
3333
# -r requirements/pip.txt
3434
# boto3
@@ -265,16 +265,8 @@ prompt-toolkit==3.0.39
265265
# via
266266
# -r requirements/pip.txt
267267
# click-repl
268-
psycopg[binary,pool]==3.1.10
268+
psycopg2==2.9.7
269269
# via -r requirements/pip.txt
270-
psycopg-binary==3.1.10
271-
# via
272-
# -r requirements/pip.txt
273-
# psycopg
274-
psycopg-pool==3.1.7
275-
# via
276-
# -r requirements/pip.txt
277-
# psycopg
278270
pycparser==2.21
279271
# via
280272
# -r requirements/pip.txt
@@ -415,8 +407,6 @@ typing-extensions==4.7.1
415407
# -r requirements/pip.txt
416408
# asgiref
417409
# filelock
418-
# psycopg
419-
# psycopg-pool
420410
tzdata==2023.3
421411
# via
422412
# -r requirements/pip.txt
@@ -452,7 +442,7 @@ wcwidth==0.2.6
452442
# via
453443
# -r requirements/pip.txt
454444
# prompt-toolkit
455-
websocket-client==1.6.2
445+
websocket-client==1.6.3
456446
# via
457447
# -r requirements/pip.txt
458448
# docker

0 commit comments

Comments
 (0)