From f552f1dd51e61d595bad74b97892ca7c381a9ca1 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 19:35:55 +0100 Subject: [PATCH 1/3] Drop Python < 3.11 support Signed-off-by: Stephen Finucane --- .github/workflows/ci.yaml | 2 +- pyproject.toml | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f0edeb2..b97520b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python: ['3.11', '3.12', '3.13', '3.14', '3.15'] steps: - name: Checkout source code uses: actions/checkout@v7 diff --git a/pyproject.toml b/pyproject.toml index 2501ad4..2b150a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ maintainers = [ ] description = "Generate man pages for click based CLI applications" readme = {file = "README.md", content-type="text/markdown"} -requires-python = ">=3.9" +requires-python = ">=3.11" license = {text = "MIT"} classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/tox.ini b/tox.ini index a05298b..a7af1b0 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ [tox] minversion = 4.4 -envlist = lint,py{39,310,311,312,313} +envlist = lint,py{311,312,313,314,315} [testenv] description = From fac656b2b97d1df94747eeffee9284d10534c62d Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 19:39:47 +0100 Subject: [PATCH 2/3] Use dependency groups Signed-off-by: Stephen Finucane --- pyproject.toml | 6 ++++++ requirements-dev.txt | 3 --- requirements.txt | 1 - tox.ini | 7 +++---- 4 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 requirements-dev.txt delete mode 100644 requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 2b150a7..adc3359 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,12 @@ dependencies = [ ] dynamic = ["version"] +[dependency-groups] +tests = [ + "pytest", + "pytest-cov", +] + [project.scripts] click-man = "click_man.shell:cli" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index b4ce471..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ --r requirements.txt -pytest -pytest-cov diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index dca9a90..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -click diff --git a/tox.ini b/tox.ini index a7af1b0..c8bbec4 100644 --- a/tox.ini +++ b/tox.ini @@ -4,15 +4,14 @@ # and then run "tox" from this directory. [tox] -minversion = 4.4 +minversion = 4.22.0 envlist = lint,py{311,312,313,314,315} [testenv] description = Run unit tests. -deps = - pytest - pytest-cov +dependency_groups = + tests commands = pytest -Wall --cov=click_man --cov-report term-missing {posargs} From df491d71f586fd7aca46f88ef0cccec7dc494d65 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 15 Oct 2026 19:46:36 +0100 Subject: [PATCH 3/3] Drop support for click 7.x Signed-off-by: Stephen Finucane --- click_man/core.py | 11 ++++------- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/click_man/core.py b/click_man/core.py index 66e74d9..af68bcd 100644 --- a/click_man/core.py +++ b/click_man/core.py @@ -16,8 +16,6 @@ from .man import ManPage -CLICK_VERSION = tuple(int(x) for x in click.__version__.split('.')[:2]) - def get_short_help_str(command, limit=45): """ @@ -98,11 +96,10 @@ def write_man_pages( commands = getattr(cli, 'commands', {}) for name, command in commands.items(): - if CLICK_VERSION >= (7, 0): - # Since Click 7.0, we have been able to mark commands as hidden - if command.hidden: - # Do not write a man page for a hidden command - continue + # Since Click 7.0, we have been able to mark commands as hidden + if command.hidden: + # Do not write a man page for a hidden command + continue write_man_pages( name, diff --git a/pyproject.toml b/pyproject.toml index adc3359..2021679 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Topic :: Documentation", ] dependencies = [ - "click", + "click>=8.0.0", ] dynamic = ["version"]