From a8842b219502fe322cc0edca394004634cd3b552 Mon Sep 17 00:00:00 2001 From: Benedikt Willi Date: Tue, 4 Jul 2023 17:44:54 +0200 Subject: [PATCH] Use python3.10 for GH workflows, fix postgres range issues in tests. --- .github/workflows/main-ci.yml | 2 +- cachalot/tests/postgres.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 65368ac..3fd636c 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9'] + python-version: ['3.10'] services: redis: diff --git a/cachalot/tests/postgres.py b/cachalot/tests/postgres.py index b7b18c4..29bd6d4 100644 --- a/cachalot/tests/postgres.py +++ b/cachalot/tests/postgres.py @@ -5,7 +5,11 @@ from unittest import skipUnless from django.contrib.postgres.functions import TransactionNow from django.db import connection from django.test import TransactionTestCase, override_settings -from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange +from django.db.backends.postgresql.psycopg_any import ( + DateRange, + DateTimeTZRange, + NumericRange, +) from pytz import timezone from ..utils import UncachableQuery