diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08b53fb..6cd024e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 @@ -80,10 +80,11 @@ jobs: # deploys. Add a row here when a new PostgreSQL major is released. matrix: include: - - {python: "3.8", postgres: "13"} + - {python: "3.9", postgres: "13"} - {python: "3.11", postgres: "15"} - {python: "3.12", postgres: "16"} - {python: "3.13", postgres: "17"} + - {python: "3.14", postgres: "18"} services: postgres: image: postgres:${{ matrix.postgres }} diff --git a/psycodict/__init__.py b/psycodict/__init__.py index 7275c6f..cf7d297 100644 --- a/psycodict/__init__.py +++ b/psycodict/__init__.py @@ -25,6 +25,10 @@ """ +# Single source of truth for the package version: pyproject.toml reads it via +# ``[tool.setuptools.dynamic]``, and it works from an uninstalled checkout too. +__version__ = "0.1.13" + try: import psycopg assert psycopg diff --git a/pyproject.toml b/pyproject.toml index 02f5232..711c09f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,20 @@ [build-system] -requires = ["setuptools", "wheel"] +# setuptools >= 77 implements PEP 639, required for the SPDX `license` string +# below; it is available on every interpreter >= 3.9. +requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [project] name = "psycodict" -version = "0.1.13" +# Version lives in psycodict/__init__.py (__version__); see [tool.setuptools.dynamic]. +dynamic = ["version"] description = "dictionary-based python interface to PostgreSQL databases" # Required by the `twine check --strict` gate in CI: without it the package # has no long_description and the PyPI project page renders empty. readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [{name = "David Roe", email = "roed.math@gmail.com"}, {name = "Edgar Costa", email = "edgarc@mit.edu"}] -license = {text = "GPL v2+"} +license = "GPL-2.0-or-later" keywords = ["postgres", "database", "interface"] [project.urls] @@ -23,6 +26,9 @@ pgsource = ["psycopg>=3.1"] pgbinary = ["psycopg[binary]>=3.1"] test = ["pytest>=7"] +[tool.setuptools.dynamic] +version = {attr = "psycodict.__version__"} + [tool.pytest.ini_options] testpaths = ["tests"] markers = [ @@ -34,7 +40,7 @@ log_cli_level = "WARNING" filterwarnings = ["error::DeprecationWarning:psycodict.*"] [tool.ruff] -target-version = "py38" +target-version = "py39" [tool.ruff.lint.per-file-ignores] # The psycopg2 availability check in __init__.py deliberately runs before the