From 634ccf53429491fbf6d8184b6fb4569273ea3152 Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Mon, 18 Nov 2024 16:38:23 -0500 Subject: [PATCH] fix: replace psycopg2 with psycopg (#1561) * build: replace psycopg2 with psycopg * build: update soil id commit * chore: regenerate requirements.txt --- requirements.txt | 18 ++++++------------ requirements/base.in | 4 ++-- .../core/management/commands/loadbackup.py | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/requirements.txt b/requirements.txt index f60f0dab0..a728a8625 100644 --- a/requirements.txt +++ b/requirements.txt @@ -652,16 +652,9 @@ profilehooks==1.13.0 \ promise==2.3 \ --hash=sha256:dfd18337c523ba4b6a58801c164c1904a9d4d1b1747c7d5dbf45b693a49d93d0 # via graphene-django -psycopg2==2.9.10 \ - --hash=sha256:0435034157049f6846e95103bd8f5a668788dd913a7c30162ca9503fdf542cb4 \ - --hash=sha256:12ec0b40b0273f95296233e8750441339298e6a572f7039da5b260e3c8b60e11 \ - --hash=sha256:47c4f9875125344f4c2b870e41b6aad585901318068acd01de93f3677a6522c2 \ - --hash=sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e \ - --hash=sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716 \ - --hash=sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067 \ - --hash=sha256:88138c8dedcbfa96408023ea2b0c369eda40fe5d75002c0964c78f46f11fa442 \ - --hash=sha256:9d5b3b94b79a844a986d029eee38998232451119ad653aea42bb9220a8c5066b \ - --hash=sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a +psycopg==3.2.3 \ + --hash=sha256:644d3973fe26908c73d4be746074f6e5224b03c1101d302d9a53bf565ad64907 \ + --hash=sha256:a5764f67c27bec8bfac85764d23c534af2c27b893550377e37ce59c12aac47a2 # via # -r requirements/base.in # soil-id @@ -950,8 +943,8 @@ sniffio==1.3.1 \ # via # anyio # httpx -soil-id @ https://github.com/techmatters/soil-id-algorithm/archive/4d4ff2b.zip \ - --hash=sha256:f5a91733225c255446925466a505e19dbcdf53d997fe030432204d7d9ad71996 +soil-id @ https://github.com/techmatters/soil-id-algorithm/archive/06c22b9.zip \ + --hash=sha256:267b2c2c6d77e001f2771e5a92691f40a9219078e8d45dc5235885275715abe3 # via -r requirements/base.in sqlparse==0.5.2 \ --hash=sha256:9e37b35e16d1cc652a2545f0997c1deb23ea28fa1f3eefe609eee3063c3b105f \ @@ -980,6 +973,7 @@ typing-extensions==4.12.2 \ # dj-database-url # graphene # jwcrypto + # psycopg tzdata==2024.2 \ --hash=sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc \ --hash=sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd diff --git a/requirements/base.in b/requirements/base.in index 53ad384b1..73014aa96 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -17,7 +17,7 @@ httpx openpyxl pandas prettyconf -psycopg2 +psycopg pyjwt[crypto] pyproj python-magic @@ -25,4 +25,4 @@ requests rules sentry-sdk[django] shapely -soil-id @ https://github.com/techmatters/soil-id-algorithm/archive/4d4ff2b.zip +soil-id @ https://github.com/techmatters/soil-id-algorithm/archive/06c22b9.zip diff --git a/terraso_backend/apps/core/management/commands/loadbackup.py b/terraso_backend/apps/core/management/commands/loadbackup.py index b37b4bf44..d9b8ff39d 100644 --- a/terraso_backend/apps/core/management/commands/loadbackup.py +++ b/terraso_backend/apps/core/management/commands/loadbackup.py @@ -29,7 +29,7 @@ from django.db import connection from django.db.models.fields import URLField from django.db.models.fields.related import ForeignKey, ManyToManyField -from psycopg2 import sql +from psycopg import sql from apps.core.models import User