From 27948d3709ed8eb38eec3b8ca7cf2388431755f6 Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Thu, 27 Aug 2026 16:53:45 +0200 Subject: [PATCH 1/2] ci(mergify): don't check Python 3.9 tests Mergify reads its configuration from the default branch, so a pull request that removes 3.9 from the CI matrix would still be gated on a `Test with Python 3.9` check run that no longer exists, and could never merge. Drop the requirement first, on its own, exactly like #142 did before 3.8 was dropped in #140. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01XkWQRxh5pfi2Fbuv3Z9wen Change-Id: I2e80afa6a0e70ac049da3512f43185a57a744e50 --- .mergify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 347c9b2..a13ac90 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,7 +1,6 @@ extends: .github shared: check_runs: &CheckRuns - - check-success=Test with Python 3.9 - check-success=Test with Python 3.10 - check-success=Test with Python 3.11 - check-success=Test with Python 3.12 From d44a0eff9a0be7ce62aeace379efc0d7d04b2945 Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Thu, 27 Aug 2026 16:53:51 +0200 Subject: [PATCH 2/2] chore: drop Python 3.9 support Python 3.9 has been end-of-life since October 2025 and no known consumer of sql-compare is still on it: the monorepo `engine` and `shadow-office` both declare `requires-python = "~=3.14.0"`. Dropping it unblocks dependencies that already require 3.10, starting with sqlparse 0.6.0. This also removes the CI workaround that existed only for 3.9. Poetry 2.4.1 needs Python >=3.10, so the job installed it under a pinned 3.12 and pointed it at the matrix interpreter with `poetry env use`. With a 3.10 floor a single `setup-python` is enough. Without `poetry env use`, though, poetry picks its interpreter off PATH, and every matrix version satisfies `python = "^3.10"` - so a wrong pick would test one version three times and stay green. The added assertion makes that fail loudly instead. `[tool.ruff] target-version` is dropped so ruff infers it from `requires-python`. It said "py312" while the floor was 3.9 and would have said it while the floor is 3.10; with `preview = true` and `UP` selected, that makes ruff raise UP040/UP046 with fixes that emit PEP 695 syntax (`type X = int`, `class Box[T]`), which is a SyntaxError on the 3.10 and 3.11 legs. Inferring keeps the two in sync permanently. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01XkWQRxh5pfi2Fbuv3Z9wen Change-Id: I220426d76c471b02a2dc667a816cf2d171da0033 --- .github/workflows/ci.yaml | 13 ++++--------- poetry.lock | 12 ++++++------ pyproject.toml | 9 +++++---- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 88254fc..f875965 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,23 +14,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - id: target-python with: python-version: "${{ matrix.python-version }}" - # poetry >=2.3 requires Python >=3.10, so install it under a fixed - # interpreter and target the matrix Python via `poetry env use`. This keeps - # the project tested on every matrix version (including 3.9). - - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.12" - run: | pip install -r requirements-poetry.txt - poetry env use "${{ steps.target-python.outputs.python-path }}" poetry sync + # poetry picks the interpreter off PATH, and every matrix version + # satisfies `python = "^3.10"`, so a wrong pick would stay green. + poetry run python -c "import sys; assert '%d.%d' % sys.version_info[:2] == '${{ matrix.python-version }}', sys.version" poetry run poe linters poetry run poe test poetry build diff --git a/poetry.lock b/poetry.lock index 13b7963..32f4f66 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "click" @@ -22,7 +22,7 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["dev"] -markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" +markers = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -68,7 +68,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, @@ -491,7 +491,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.7" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -523,5 +523,5 @@ files = [ [metadata] lock-version = "2.1" -python-versions = "^3.9" -content-hash = "9493dda8122b6c20086e61e3dc9b219876410b0df910321cc809253b242da33e" +python-versions = "^3.10" +content-hash = "1592ba7aaf8876dd5ef1d9cd679dbe266e061b8bbfe7cc364771fd181be148e3" diff --git a/pyproject.toml b/pyproject.toml index 0561340..b2ce45c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -26,7 +25,7 @@ classifiers = [ "Topic :: Software Development :: Testing", "Topic :: Software Development :: Testing :: Unit", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dynamic = ["version"] [project.urls] @@ -37,7 +36,7 @@ repository = "https://github.com/Mergifyio/sql-compare" version = "0.0.0" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" sqlparse = ">=0.5.0" [tool.poetry.group.dev.dependencies] @@ -69,7 +68,9 @@ filterwarnings = ["error"] [tool.ruff] line-length = 88 indent-width = 4 -target-version = "py312" +# No target-version: ruff infers it from `requires-python`, so the two cannot +# drift. Pinning py312 while the floor is 3.10 makes ruff demand PEP 695 +# syntax that is a SyntaxError on the 3.10 and 3.11 matrix legs. [tool.ruff.lint] preview = true