Skip to content

Commit 9a637d0

Browse files
committed
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
1 parent 48afefd commit 9a637d0

File tree

6 files changed

+16
-46
lines changed

6 files changed

+16
-46
lines changed

requirements/deploy.txt

+2-12
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ dj-pagination==2.5.0
9696
# via -r requirements/pip.txt
9797
dj-stripe==2.6.3
9898
# via -r requirements/pip.txt
99-
django==4.2.4
99+
django==4.2.5
100100
# via
101101
# -r requirements/pip.txt
102102
# dj-stripe
@@ -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

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

+4-12
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ dj-pagination==2.5.0
105105
# via -r requirements/pip.txt
106106
dj-stripe==2.6.3
107107
# via -r requirements/pip.txt
108-
django==4.2.4
108+
django==4.2.5
109109
# via
110110
# -r requirements/pip.txt
111111
# dj-stripe
@@ -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

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

+2-8
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dj-pagination==2.5.0
5656
# via -r requirements/pip.in
5757
dj-stripe==2.6.3
5858
# via -r requirements/pip.in
59-
django==4.2.4
59+
django==4.2.5
6060
# via
6161
# -r requirements/pip.in
6262
# dj-stripe
@@ -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

requirements/testing.txt

+2-12
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ dj-pagination==2.5.0
9595
# via -r requirements/pip.txt
9696
dj-stripe==2.6.3
9797
# via -r requirements/pip.txt
98-
django==4.2.4
98+
django==4.2.5
9999
# via
100100
# -r requirements/pip.txt
101101
# dj-stripe
@@ -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

0 commit comments

Comments
 (0)