From fd76f3a47d135db75974c908507a6981ceb515e2 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 | 2 +- NEWS | 1 + tests/test_types_basic.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19baedffb..709ab61d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 4940a91d7..c70c85eb8 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 c3f615904..54f1a2113 100755 --- a/tests/test_types_basic.py +++ b/tests/test_types_basic.py @@ -74,6 +74,9 @@ def testDecimal(self): 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,