Skip to content

Commit

Permalink
Tweak postgresql requirements on Python 3.13 since a working version …
Browse files Browse the repository at this point in the history
…of psycopg2 isn't available yet.
  • Loading branch information
jamadden committed Oct 11, 2024
1 parent a068ddb commit 64335cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 4 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"': [
Expand Down Expand Up @@ -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={
Expand Down

0 comments on commit 64335cb

Please sign in to comment.