Skip to content

Commit

Permalink
chore: add support for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Oct 3, 2023
1 parent abf2723 commit 37d1de1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .appveyor/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ environment:
matrix:
# For Python versions available on Appveyor, see
# https://www.appveyor.com/docs/windows-images-software/#python
- {PY_VER: "312", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
- {PY_VER: "312", PY_ARCH: "64", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
- {PY_VER: "311", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
- {PY_VER: "311", PY_ARCH: "64", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
- {PY_VER: "310", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
matrix:
platform: [manylinux, musllinux]
arch: [x86_64, i686, aarch64, ppc64le]
pyver: [cp37, cp38, cp39, cp310, cp311]
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]

runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
matrix:
# These archs require an Apple M1 runner: [arm64, universal2]
arch: [x86_64]
pyver: [cp37, cp38, cp39, cp310, cp311]
pyver: [cp37, cp38, cp39, cp310, cp311, cp312]

steps:
- name: Checkout repos
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ jobs:
- {python: "3.9", postgres: "13"}
- {python: "3.10", postgres: "14"}
- {python: "3.11", postgres: "15"}
- {python: "3.12", postgres: "16"}

# Opposite extremes of the supported Py/PG range, other architecture
- {python: "3.7", postgres: "15", architecture: "x86"}
- {python: "3.8", postgres: "14", architecture: "x86"}
- {python: "3.9", postgres: "12", architecture: "x86"}
- {python: "3.10", postgres: "11", architecture: "x86"}
- {python: "3.11", postgres: "10", architecture: "x86"}
- {python: "3.7", postgres: "16", architecture: "x86"}
- {python: "3.8", postgres: "15", architecture: "x86"}
- {python: "3.9", postgres: "14", architecture: "x86"}
- {python: "3.10", postgres: "13", architecture: "x86"}
- {python: "3.11", postgres: "11", architecture: "x86"}
- {python: "3.12", postgres: "10", architecture: "x86"}

env:
PSYCOPG2_TESTDB: postgres
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Current release
What's new in psycopg 2.9.9
^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Add support for Python 3.12.
- Drop support for Python 3.6.


Expand Down
4 changes: 2 additions & 2 deletions doc/src/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ The current `!psycopg2` implementation supports:
..
NOTE: keep consistent with setup.py and the /features/ page.
- Python versions from 3.7 to 3.11
- PostgreSQL server versions from 7.4 to 15
- Python versions from 3.7 to 3.12
- PostgreSQL server versions from 7.4 to 16
- PostgreSQL client library version from 9.1

.. note::
Expand Down
3 changes: 2 additions & 1 deletion scripts/build/appveyor.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def py_ver(self):
For large values of 2, occasionally.
"""
rv = os.environ['PY_VER']
assert rv in ('37', '38', '39', '310', '311'), rv
assert rv in ('37', '38', '39', '310', '311', "312"), rv
return rv

@property
Expand Down Expand Up @@ -747,6 +747,7 @@ def vs_ver(self):
'39': '16.0',
'310': '16.0',
'311': '16.0',
'312': '16.0',
}
return vsvers[self.py_ver]

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/build_macos_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -euo pipefail
# set -x

python_versions="3.8.10 3.9.13 3.10.5 3.11.0"
python_versions="3.8.10 3.9.13 3.10.5 3.11.0 3.12.0"
pg_version=16

function log {
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
Programming Language :: C
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {3.7,3.8,3.9,3.10,3.11}
envlist = {3.7,3.8,3.9,3.10,3.11,3.12}

[testenv]
commands = make check
Expand Down

0 comments on commit 37d1de1

Please sign in to comment.