From bf9b88f312640ea2e73b8dcad39b19bfc804601a Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Mon, 28 Sep 2026 23:22:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat:=20support=20Python=203.15?= =?UTF-8?q?/3.15t=20and=20require=20Python=203.11+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint-and-fmt.yml | 5 ++++- .github/workflows/unit-test.yml | 26 +++++++++++++++++++++++++- README.md | 2 ++ pyproject.toml | 8 ++++---- uv.lock | 30 +++++------------------------- 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/.github/workflows/lint-and-fmt.yml b/.github/workflows/lint-and-fmt.yml index a4caa70..1c3149a 100644 --- a/.github/workflows/lint-and-fmt.yml +++ b/.github/workflows/lint-and-fmt.yml @@ -10,10 +10,13 @@ on: jobs: lint-and-fmt: runs-on: ubuntu-latest + env: + UV_PYTHON: ${{ matrix.python-version }} + UV_LOCKED: "1" strategy: matrix: # Only run linter and formatter on minimum supported Python version - python-version: ["3.10"] + python-version: ["3.11"] architecture: ["x64"] name: lint and fmt - Python ${{ matrix.python-version }} on ${{ matrix.architecture }} steps: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6be7823..3d2c311 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -10,9 +10,13 @@ on: jobs: unit-test: runs-on: ubuntu-latest + env: + UV_PYTHON: ${{ matrix.python-version }} + UV_LOCKED: "1" strategy: + fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] architecture: ["x64"] name: unittest - Python ${{ matrix.python-version }} on ${{ matrix.architecture }} steps: @@ -38,6 +42,26 @@ jobs: run: | just ci-install + - name: Verify Python runtime + run: | + uv run --locked python - <<'PY' + import os + import sys + import sysconfig + + import docufix.__main__ + import pytest + import typing_extensions + + requested = os.environ["UV_PYTHON"] + expected_version = tuple(map(int, requested.rstrip("t").split("."))) + assert sys.version_info[:2] == expected_version, sys.version + assert bool(sysconfig.get_config_var("Py_GIL_DISABLED")) == requested.endswith("t") + if requested.endswith("t"): + assert not sys._is_gil_enabled(), "Dependencies must not re-enable the GIL" + print(sys.version) + PY + - name: unit test run: | just ci-test diff --git a/README.md b/README.md index 7e4621a..47f816e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A simple doc style fixer. ## Installation +Requires Python 3.11 or newer. + ```bash pip install docufix ``` diff --git a/pyproject.toml b/pyproject.toml index 84e8858..2bc139d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "docufix" version = "0.3.2" description = "" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" authors = [{ name = "Nyakku Shigure", email = "sigure.qaq@gmail.com" }] keywords = [] license = "MIT" @@ -12,14 +12,14 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", ] -dependencies = ["typing-extensions>=4.12.2"] +dependencies = ["typing-extensions>=4.16.0"] [project.urls] Homepage = "https://github.com/ShigureLab/moelib" @@ -40,7 +40,7 @@ dev = [ [tool.ruff] line-length = 120 -target-version = "py310" +target-version = "py311" [tool.ruff.lint] select = [ diff --git a/uv.lock b/uv.lock index 386f8f9..da82fab 100644 --- a/uv.lock +++ b/uv.lock @@ -1,6 +1,6 @@ version = 1 revision = 3 -requires-python = ">=3.10" +requires-python = ">=3.11" [[package]] name = "colorama" @@ -28,7 +28,7 @@ dev = [ ] [package.metadata] -requires-dist = [{ name = "typing-extensions", specifier = ">=4.12.2" }] +requires-dist = [{ name = "typing-extensions", specifier = ">=4.16.0" }] [package.metadata.requires-dev] dev = [ @@ -38,15 +38,6 @@ dev = [ { name = "ty", specifier = ">=0.0.84" }, ] -[[package]] -name = "exceptiongroup" -version = "1.2.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/09/35/2495c4ac46b980e4ca1f6ad6db102322ef3ad2410b79fdde159a4b0f3b92/exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc", size = 28883, upload-time = "2024-07-12T22:26:00.161Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b", size = 16453, upload-time = "2024-07-12T22:25:58.476Z" }, -] - [[package]] name = "iniconfig" version = "2.0.0" @@ -89,12 +80,10 @@ version = "9.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "iniconfig" }, { name = "packaging" }, { name = "pluggy" }, { name = "pygments" }, - { name = "tomli", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } wheels = [ @@ -139,15 +128,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/51/60/5fb1a39dbb5ae314d5f59bc7348a63c1d5c20f3cd83914c4b5cb0be31d2d/ruff-0.16.9-py3-none-win_arm64.whl", hash = "sha256:ed1a252039200f57a59eebc063b54beabea67bfbaaca0eeaa7f54b5fbcda2284", size = 10458649, upload-time = "2026-09-24T20:37:46.882Z" }, ] -[[package]] -name = "tomli" -version = "2.0.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/35/b9/de2a5c0144d7d75a57ff355c0c24054f965b2dc3036456ae03a51ea6264b/tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed", size = 16096, upload-time = "2024-10-02T10:46:13.208Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cf/db/ce8eda256fa131af12e0a76d481711abe4681b6923c27efb9a255c9e4594/tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38", size = 13237, upload-time = "2024-10-02T10:46:11.806Z" }, -] - [[package]] name = "ty" version = "0.0.84" @@ -175,9 +155,9 @@ wheels = [ [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321, upload-time = "2024-06-07T18:52:15.995Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438, upload-time = "2024-06-07T18:52:13.582Z" }, + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] From ee5fc9b0d851a1ddeb68958592ad5b07ee69d69c Mon Sep 17 00:00:00 2001 From: Nyako Shigure Date: Tue, 29 Sep 2026 00:37:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20chore:=20minimize=20Py?= =?UTF-8?q?thon=20compatibility=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint-and-fmt.yml | 3 --- .github/workflows/unit-test.yml | 22 ---------------------- README.md | 2 -- pyproject.toml | 2 +- uv.lock | 8 ++++---- 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/.github/workflows/lint-and-fmt.yml b/.github/workflows/lint-and-fmt.yml index 1c3149a..7f02ec3 100644 --- a/.github/workflows/lint-and-fmt.yml +++ b/.github/workflows/lint-and-fmt.yml @@ -10,9 +10,6 @@ on: jobs: lint-and-fmt: runs-on: ubuntu-latest - env: - UV_PYTHON: ${{ matrix.python-version }} - UV_LOCKED: "1" strategy: matrix: # Only run linter and formatter on minimum supported Python version diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 3d2c311..eaaac6b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,9 +12,7 @@ jobs: runs-on: ubuntu-latest env: UV_PYTHON: ${{ matrix.python-version }} - UV_LOCKED: "1" strategy: - fail-fast: false matrix: python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"] architecture: ["x64"] @@ -42,26 +40,6 @@ jobs: run: | just ci-install - - name: Verify Python runtime - run: | - uv run --locked python - <<'PY' - import os - import sys - import sysconfig - - import docufix.__main__ - import pytest - import typing_extensions - - requested = os.environ["UV_PYTHON"] - expected_version = tuple(map(int, requested.rstrip("t").split("."))) - assert sys.version_info[:2] == expected_version, sys.version - assert bool(sysconfig.get_config_var("Py_GIL_DISABLED")) == requested.endswith("t") - if requested.endswith("t"): - assert not sys._is_gil_enabled(), "Dependencies must not re-enable the GIL" - print(sys.version) - PY - - name: unit test run: | just ci-test diff --git a/README.md b/README.md index 47f816e..7e4621a 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ A simple doc style fixer. ## Installation -Requires Python 3.11 or newer. - ```bash pip install docufix ``` diff --git a/pyproject.toml b/pyproject.toml index 2bc139d..78cad76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", ] -dependencies = ["typing-extensions>=4.16.0"] +dependencies = ["typing-extensions>=4.14.0"] [project.urls] Homepage = "https://github.com/ShigureLab/moelib" diff --git a/uv.lock b/uv.lock index da82fab..98b40d2 100644 --- a/uv.lock +++ b/uv.lock @@ -28,7 +28,7 @@ dev = [ ] [package.metadata] -requires-dist = [{ name = "typing-extensions", specifier = ">=4.16.0" }] +requires-dist = [{ name = "typing-extensions", specifier = ">=4.14.0" }] [package.metadata.requires-dev] dev = [ @@ -155,9 +155,9 @@ wheels = [ [[package]] name = "typing-extensions" -version = "4.16.0" +version = "4.14.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d1/bc/51647cd02527e87d05cb083ccc402f93e441606ff1f01739a62c8ad09ba5/typing_extensions-4.14.0.tar.gz", hash = "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4", size = 107423, upload-time = "2025-06-02T14:52:11.399Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, + { url = "https://files.pythonhosted.org/packages/69/e0/552843e0d356fbb5256d21449fa957fa4eff3bbc135a74a691ee70c7c5da/typing_extensions-4.14.0-py3-none-any.whl", hash = "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af", size = 43839, upload-time = "2025-06-02T14:52:10.026Z" }, ]