From 64335cbad5bc522e4d7d6315194ed1d3c6be8e99 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Fri, 11 Oct 2024 11:57:01 -0500 Subject: [PATCH] Tweak postgresql requirements on Python 3.13 since a working version of psycopg2 isn't available yet. --- appveyor.yml | 10 ++++------ setup.py | 12 +++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1218c1f2..2aab4790 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,12 +37,10 @@ environment: # Fully supported 64-bit versions, with testing. This should be # all the current (non EOL) versions. - # 2024-10-11: Awaiting release of psycopg 2.9.10; current - # release won't build on Py 3.13 - # - PYTHON: "C:\\Python313-x64" - # PYTHON_VERSION: "3.13.0" - # PYTHON_ARCH: "64" - # PYTHON_EXE: python + - PYTHON: "C:\\Python313-x64" + PYTHON_VERSION: "3.13.0" + PYTHON_ARCH: "64" + PYTHON_EXE: python - PYTHON: "C:\\Python312-x64" PYTHON_VERSION: "3.12.0" diff --git a/setup.py b/setup.py index 060f2455..868cdc47 100644 --- a/setup.py +++ b/setup.py @@ -298,16 +298,18 @@ def read_file(*path): # and the authors specifically request that other modules not depend on # psycopg2-binary. # See http://initd.org/psycopg/docs/install.html#binary-packages - 'postgresql: platform_python_implementation == "CPython"': [ + 'postgresql: platform_python_implementation == "CPython" and python_version != "3.13"' : [ # 2.4.1+ is required for proper bytea handling; # 2.6+ is needed for 64-bit lobject support; # 2.7+ is needed for Python 3.7 support and PostgreSQL 10+; # 2.7.6+ is needed for PostgreSQL 11; # 2.8 is needed for conn.info + # 2.9.10 will be needed for Python 3.13, but it's not out yet. 'psycopg2 >= 2.8.3', ], - 'postgresql: platform_python_implementation == "CPython" and python_version == "3.12"': [ - # psycopg2 isn't importing on Appveyor/3.12b4. + 'postgresql: platform_python_implementation == "CPython" and python_version == "3.13"': [ + # psycopg2 2.9.10 is needed, but not available yet. + # See also 'all tested drivers' 'pg8000', ], 'postgresql: platform_python_implementation == "PyPy"': [ @@ -353,11 +355,11 @@ def read_file(*path): # pure-python # pg8000 # This requirement is repeated in the driver class. - 'pg8000 >= 1.29.0; python_version == "3.11"', + 'pg8000 >= 1.29.0; python_version == "3.11" or python_version == "3.13"', # CFFI, runs on all implementations. 'psycopg2cffi >= 2.7.4; python_version == "3.11" or platform_python_implementation == "PyPy"', # Psycopg2 on all CPython, it's the default - 'psycopg2 >= 2.8.3; platform_python_implementation == "CPython"', + 'psycopg2 >= 2.8.3; platform_python_implementation == "CPython" and python_version != "3.13"', ], }, entry_points={