diff --git a/.appveyor/packages.yml b/.appveyor/packages.yml index 890048e0a..740b5e0ef 100644 --- a/.appveyor/packages.yml +++ b/.appveyor/packages.yml @@ -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} diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 11ad9db48..5018ab782 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -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: @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index caa207eba..8a4f5db7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/NEWS b/NEWS index 6cf728200..5dec82fb3 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/doc/src/install.rst b/doc/src/install.rst index 967d09aab..00d693a03 100644 --- a/doc/src/install.rst +++ b/doc/src/install.rst @@ -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:: diff --git a/scripts/build/appveyor.py b/scripts/build/appveyor.py index 5c7cd5910..d2752f9f5 100755 --- a/scripts/build/appveyor.py +++ b/scripts/build/appveyor.py @@ -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 @@ -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] diff --git a/scripts/build/build_macos_arm64.sh b/scripts/build/build_macos_arm64.sh index 498c7a0ea..1f951c34f 100755 --- a/scripts/build/build_macos_arm64.sh +++ b/scripts/build/build_macos_arm64.sh @@ -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 { diff --git a/setup.py b/setup.py index 4e9f1698a..bfa0900dc 100644 --- a/setup.py +++ b/setup.py @@ -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 diff --git a/tox.ini b/tox.ini index bfb01684d..52ed80e3d 100644 --- a/tox.ini +++ b/tox.ini @@ -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