From 464d17e8f3c8552859dc4565bb56d5cf1f1a2097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 10 Oct 2024 18:10:34 -0600 Subject: [PATCH] Skip in older postgres --- .github/workflows/tests.yml | 4 ++-- NEWS | 1 + tests/test_types_basic.py | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19baedff..bbf11193 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: - {python: "3.10", postgres: "14"} - {python: "3.11", postgres: "15"} - {python: "3.12", postgres: "16"} - - {python: "3.13-dev", postgres: "17"} + - {python: "3.13", postgres: "17"} # Opposite extremes of the supported Py/PG range, other architecture - {python: "3.8", postgres: "17", architecture: "x86"} @@ -26,7 +26,7 @@ jobs: - {python: "3.10", postgres: "15", architecture: "x86"} - {python: "3.11", postgres: "14", architecture: "x86"} - {python: "3.12", postgres: "13", architecture: "x86"} - - {python: "3.13-dev", postgres: "12", architecture: "x86"} + - {python: "3.13", postgres: "12", architecture: "x86"} env: PSYCOPG2_TESTDB: postgres diff --git a/NEWS b/NEWS index 4940a91d..c70c85eb 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ What's new in psycopg 2.9.10 (unreleased) - Add support for Python 3.13. - Drop support for Python 3.7. +- Fix ``Decimal('Infinity')`` adaptation. What's new in psycopg 2.9.9 diff --git a/tests/test_types_basic.py b/tests/test_types_basic.py index c3f61590..54f1a211 100755 --- a/tests/test_types_basic.py +++ b/tests/test_types_basic.py @@ -74,6 +74,9 @@ class TypesBasicTests(ConnectingTestCase): self.failUnless(str(s) == "NaN", "wrong decimal quoting: " + str(s)) self.failUnless(type(s) == decimal.Decimal, "wrong decimal conversion: " + repr(s)) + + @testutils.skip_before_postgres(14, 0) + def testDecimalInfinity(self): s = self.execute("SELECT %s AS foo", (decimal.Decimal("infinity"),)) self.failUnless(str(s) == "Infinity", "wrong decimal quoting: " + str(s)) self.failUnless(type(s) == decimal.Decimal,