diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index ebb380ca..1375a4b6 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -66,7 +66,7 @@ jobs: matrix: platform: [manylinux, musllinux] arch: [x86_64, aarch64, ppc64le] - pyver: [cp38, cp39, cp310, cp311, cp312, cp313] + pyver: [cp39, cp310, cp311, cp312, cp313] runs-on: ubuntu-latest steps: @@ -184,7 +184,7 @@ jobs: fail-fast: false matrix: arch: [win_amd64] - pyver: [cp38, cp39, cp310, cp311, cp312, cp313] + pyver: [cp39, cp310, cp311, cp312, cp313] package_name: [psycopg2, psycopg2-binary] defaults: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ca6a4419..27a2c89a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,6 @@ jobs: fail-fast: false matrix: include: - - {python: "3.8", postgres: "12"} - {python: "3.9", postgres: "13"} - {python: "3.10", postgres: "14"} - {python: "3.11", postgres: "15"} @@ -24,12 +23,11 @@ jobs: - {python: "3.13", postgres: "17"} # Opposite extremes of the supported Py/PG range, other architecture - - {python: "3.8", postgres: "17", architecture: "x86"} - - {python: "3.9", postgres: "16", architecture: "x86"} - - {python: "3.10", postgres: "15", architecture: "x86"} - - {python: "3.11", postgres: "14", architecture: "x86"} - - {python: "3.12", postgres: "13", architecture: "x86"} - - {python: "3.13", postgres: "12", architecture: "x86"} + - {python: "3.9", postgres: "17", architecture: "x86"} + - {python: "3.10", postgres: "16", architecture: "x86"} + - {python: "3.11", postgres: "15", architecture: "x86"} + - {python: "3.12", postgres: "14", architecture: "x86"} + - {python: "3.13", postgres: "13", architecture: "x86"} env: PSYCOPG2_TESTDB: postgres diff --git a/NEWS b/NEWS index 31bb23fd..7120b838 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ Current release --------------- +What's new in psycopg 2.9.11 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Drop support for Python 3.8. + + What's new in psycopg 2.9.10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/install.rst b/doc/src/install.rst index 0ff3f5d5..90174520 100644 --- a/doc/src/install.rst +++ b/doc/src/install.rst @@ -131,7 +131,7 @@ The current `!psycopg2` implementation supports: .. NOTE: keep consistent with setup.py and the /features/ page. -- Python versions from 3.8 to 3.13 +- Python versions from 3.9 to 3.13 - PostgreSQL server versions from 7.4 to 17 - PostgreSQL client library version from 9.1 diff --git a/psycopg/python.h b/psycopg/python.h index f8c2c0aa..5f3ba2c1 100644 --- a/psycopg/python.h +++ b/psycopg/python.h @@ -27,8 +27,8 @@ #ifndef PSYCOPG_PYTHON_H #define PSYCOPG_PYTHON_H 1 -#if PY_VERSION_HEX < 0x03080000 -#error "psycopg requires Python 3.8" +#if PY_VERSION_HEX < 0x03090000 +#error "psycopg requires Python 3.9" #endif #include diff --git a/psycopg/utils.c b/psycopg/utils.c index 1dfb87d0..93f0636c 100644 --- a/psycopg/utils.c +++ b/psycopg/utils.c @@ -395,25 +395,9 @@ psyco_is_main_interp(void) #if PY_VERSION_HEX >= 0x030d0000 /* tested with Python 3.13.0a6 */ return PyInterpreterState_Get() == PyInterpreterState_Main(); -#elif PY_VERSION_HEX >= 0x03080000 +#else /* tested with Python 3.8.0a2 */ return _PyInterpreterState_Get() == PyInterpreterState_Main(); -#else - static PyInterpreterState *main_interp = NULL; /* Cached reference */ - PyInterpreterState *interp; - - if (main_interp) { - return (main_interp == PyThreadState_Get()->interp); - } - - /* No cached value: cache the proper value and try again. */ - interp = PyInterpreterState_Head(); - while (interp->next) - interp = interp->next; - - main_interp = interp; - assert (main_interp); - return psyco_is_main_interp(); #endif } diff --git a/setup.py b/setup.py index b4cc7c62..0ed11d76 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,6 @@ Intended Audience :: Developers License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Programming Language :: Python Programming Language :: Python :: 3 -Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 @@ -524,7 +523,7 @@ setup(name="psycopg2", url="https://psycopg.org/", license="LGPL with exceptions", platforms=["any"], - python_requires='>=3.8', + python_requires='>=3.9', description=readme.split("\n")[0], long_description="\n".join(readme.split("\n")[2:]).lstrip(), classifiers=[x for x in classifiers.split("\n") if x], diff --git a/tox.ini b/tox.ini index c46872dd..5b5905e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {3.8,3.9,3.10,3.11,3.12,3.13} +envlist = {3.9,3.10,3.11,3.12,3.13} [testenv] commands = make check