From 8388863c8aeed109bc87b1667cd981d79d1538e9 Mon Sep 17 00:00:00 2001 From: Logan Wang Date: Sat, 22 Nov 2025 23:28:24 +1100 Subject: [PATCH 1/5] Expand test coverage on python 313/314 and pg --- .github/workflows/linux.yaml | 4 ++-- .github/workflows/macos.yaml | 2 ++ docs/installation.rst | 4 ++-- docs/testing.rst | 2 +- setup.py | 2 ++ tox.ini | 32 ++++++++++++++++++++++++++++++-- 6 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index ac09ce5..9067be9 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - py: ['3.8', '3.9', '3.10', '3.11', '3.12'] + py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: checkout uses: actions/checkout@v4 @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pg: [12, 13, 14, 15] + pg: [12, 13, 14, 15, 16, 17, 18] steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 2504d68..94bd7b8 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -17,6 +17,8 @@ jobs: - postgresql@14 - postgresql@15 - postgresql@16 + - postgresql@17 + - postgresql@18 runs-on: macos-14 steps: - name: os info diff --git a/docs/installation.rst b/docs/installation.rst index a8da7aa..ccc2aa1 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,8 +19,8 @@ approach is to create a psycopg2 wheel for distribution to production machines Compatibility """"""""""""" -pgcopy is tested with Python versions 3.8 -- 3.12 and -PostgreSQL versions 12 -- 16 +pgcopy is tested with Python versions 3.8 -- 3.14 and +PostgreSQL versions 12 -- 18 .. note:: diff --git a/docs/testing.rst b/docs/testing.rst index c3c3ca4..19841ee 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -16,7 +16,7 @@ database: For more thorough testing, tox_ with tox-docker_ will run tests on python -versions 3.8 -- 3.12 and postgresql versions 12 -- 16:: +versions 3.8 -- 3.14 and postgresql versions 12 -- 18:: $ tox diff --git a/setup.py b/setup.py index 78cfb49..9095c61 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,8 @@ def get_version(package_name, default="0.1"): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", diff --git a/tox.ini b/tox.ini index 6b42c50..0aa7d13 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = - py{38,39,310,311,312} - py310-pg{12,13,14,15} + py{38,39,310,311,312,313,314} + py310-pg{12,13,14,15,16,17,18} vector psycopg28 [testenv] @@ -24,6 +24,12 @@ docker = pg13 docker = pg14 [testenv:py310-pg15] docker = pg15 +[testenv:py310-pg16] +docker = pg16 +[testenv:py310-pg17] +docker = pg17 +[testenv:py310-pg18] +docker = pg18 [testenv:vector] base_python = python3.10 docker = pgvector @@ -97,6 +103,28 @@ healthcheck_timeout = 1 healthcheck_retries = 30 healthcheck_interval = 1 healthcheck_start_period = 1 +[docker:pg17] +image = postgres:17 +environment= + POSTGRES_HOST_AUTH_METHOD=trust +healthcheck_cmd = psql --user=postgres \ + --host=127.0.0.1 --quiet --no-align --tuples-only \ + -1 --command="SELECT 1" +healthcheck_timeout = 1 +healthcheck_retries = 30 +healthcheck_interval = 1 +healthcheck_start_period = 1 +[docker:pg18] +image = postgres:18 +environment= + POSTGRES_HOST_AUTH_METHOD=trust +healthcheck_cmd = psql --user=postgres \ + --host=127.0.0.1 --quiet --no-align --tuples-only \ + -1 --command="SELECT 1" +healthcheck_timeout = 1 +healthcheck_retries = 30 +healthcheck_interval = 1 +healthcheck_start_period = 1 [docker:pgvector] image = pgvector/pgvector:pg16 environment= From 8065d82c49893fa01c6ff7460f3b9bf89df0b05b Mon Sep 17 00:00:00 2001 From: Aryeh Leib Taurog Date: Sat, 22 Nov 2025 20:48:10 +0200 Subject: [PATCH 2/5] test: remove Python 3.8 --- .github/workflows/linux.yaml | 2 +- docs/installation.rst | 2 +- docs/testing.rst | 2 +- setup.py | 1 - tox.ini | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 9067be9..cb37623 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + py: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: checkout uses: actions/checkout@v4 diff --git a/docs/installation.rst b/docs/installation.rst index ccc2aa1..b205920 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,7 +19,7 @@ approach is to create a psycopg2 wheel for distribution to production machines Compatibility """"""""""""" -pgcopy is tested with Python versions 3.8 -- 3.14 and +pgcopy is tested with Python versions 3.9 -- 3.14 and PostgreSQL versions 12 -- 18 .. note:: diff --git a/docs/testing.rst b/docs/testing.rst index 19841ee..a6626fd 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -16,7 +16,7 @@ database: For more thorough testing, tox_ with tox-docker_ will run tests on python -versions 3.8 -- 3.14 and postgresql versions 12 -- 18:: +versions 3.9 -- 3.14 and postgresql versions 12 -- 18:: $ tox diff --git a/setup.py b/setup.py index 9095c61..3aee002 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,6 @@ def get_version(package_name, default="0.1"): install_requires=["psycopg2", "pytz"], classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/tox.ini b/tox.ini index 0aa7d13..ffa9bb3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311,312,313,314} + py{39,310,311,312,313,314} py310-pg{12,13,14,15,16,17,18} vector psycopg28 From bea5a2fd682980869999082dfa1898b255f774ba Mon Sep 17 00:00:00 2001 From: Aryeh Leib Taurog Date: Sat, 22 Nov 2025 20:50:31 +0200 Subject: [PATCH 3/5] test: remove postgresql 12 --- .github/workflows/linux.yaml | 2 +- .github/workflows/macos.yaml | 1 - docs/installation.rst | 2 +- docs/testing.rst | 2 +- tox.ini | 15 +-------------- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index cb37623..0927028 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pg: [12, 13, 14, 15, 16, 17, 18] + pg: [13, 14, 15, 16, 17, 18] steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 94bd7b8..a5d66bf 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -12,7 +12,6 @@ jobs: strategy: matrix: pg: - - postgresql@12 - postgresql@13 - postgresql@14 - postgresql@15 diff --git a/docs/installation.rst b/docs/installation.rst index b205920..0e9696a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -20,7 +20,7 @@ approach is to create a psycopg2 wheel for distribution to production machines Compatibility """"""""""""" pgcopy is tested with Python versions 3.9 -- 3.14 and -PostgreSQL versions 12 -- 18 +PostgreSQL versions 13 -- 18 .. note:: diff --git a/docs/testing.rst b/docs/testing.rst index a6626fd..89a2c58 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -16,7 +16,7 @@ database: For more thorough testing, tox_ with tox-docker_ will run tests on python -versions 3.9 -- 3.14 and postgresql versions 12 -- 18:: +versions 3.9 -- 3.14 and postgresql versions 13 -- 18:: $ tox diff --git a/tox.ini b/tox.ini index ffa9bb3..11a88f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py{39,310,311,312,313,314} - py310-pg{12,13,14,15,16,17,18} + py310-pg{13,14,15,16,17,18} vector psycopg28 [testenv] @@ -16,8 +16,6 @@ setenv = POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres [testenv:python2.7] -[testenv:py310-pg12] -docker = pg12 [testenv:py310-pg13] docker = pg13 [testenv:py310-pg14] @@ -48,17 +46,6 @@ deps = pytest psycopg2==2.8.* docker = pg14 -[docker:pg12] -image = postgres:12 -environment= - POSTGRES_HOST_AUTH_METHOD=trust -healthcheck_cmd = psql --user=postgres \ - --host=127.0.0.1 --quiet --no-align --tuples-only \ - -1 --command="SELECT 1" -healthcheck_timeout = 1 -healthcheck_retries = 30 -healthcheck_interval = 1 -healthcheck_start_period = 1 [docker:pg13] image = postgres:13 environment= From 384b309fbccb1f1ac6bb0a2a6c027bf8d6eb128f Mon Sep 17 00:00:00 2001 From: Aryeh Leib Taurog Date: Sat, 22 Nov 2025 20:53:23 +0200 Subject: [PATCH 4/5] test: bump default python from 3.10 to 3.12 --- .github/workflows/linux.yaml | 6 +++--- tox.ini | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 0927028..42df09b 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -41,7 +41,7 @@ jobs: - name: install python deps run: pip3 install tox tox-docker - name: run tests - run: tox -e py310-pg${{ matrix.pg }} + run: tox -e py312-pg${{ matrix.pg }} contrib: name: Contrib @@ -55,7 +55,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: install python deps run: pip3 install tox tox-docker - name: run tests @@ -70,7 +70,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: install python deps run: pip3 install tox tox-docker - name: run tests diff --git a/tox.ini b/tox.ini index 11a88f6..1b45d08 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py{39,310,311,312,313,314} - py310-pg{13,14,15,16,17,18} + py312-pg{13,14,15,16,17,18} vector psycopg28 [testenv] @@ -16,20 +16,20 @@ setenv = POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres [testenv:python2.7] -[testenv:py310-pg13] +[testenv:py312-pg13] docker = pg13 -[testenv:py310-pg14] +[testenv:py312-pg14] docker = pg14 -[testenv:py310-pg15] +[testenv:py312-pg15] docker = pg15 -[testenv:py310-pg16] +[testenv:py312-pg16] docker = pg16 -[testenv:py310-pg17] +[testenv:py312-pg17] docker = pg17 -[testenv:py310-pg18] +[testenv:py312-pg18] docker = pg18 [testenv:vector] -base_python = python3.10 +base_python = python3.12 docker = pgvector commands = pytest tests/test_contrib.py -vk Vector [testenv:coverage] @@ -41,7 +41,7 @@ commands = pytest --cov-report=term --cov-report=lcov:coverage.lcov --cov=pgcopy/ tests/ docker = pgvector [testenv:psycopg28] -base_python = python3.10 +base_python = python3.12 deps = pytest psycopg2==2.8.* From dff37230b49de6a40ed1ef63d7f89786902bbe3d Mon Sep 17 00:00:00 2001 From: Aryeh Leib Taurog Date: Sat, 22 Nov 2025 20:59:23 +0200 Subject: [PATCH 5/5] test: test psycopg2.8 with python 3.9 --- .github/workflows/linux.yaml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 42df09b..dd68f8e 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -70,7 +70,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.9" - name: install python deps run: pip3 install tox tox-docker - name: run tests diff --git a/tox.ini b/tox.ini index 1b45d08..c4a77e8 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,7 @@ commands = pytest --cov-report=term --cov-report=lcov:coverage.lcov --cov=pgcopy/ tests/ docker = pgvector [testenv:psycopg28] -base_python = python3.12 +base_python = python3.9 deps = pytest psycopg2==2.8.*