From 2cbc78868bc6d09451a27477db6d6597cab99ed3 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Wed, 20 May 2026 09:55:39 -0400 Subject: [PATCH 1/2] Require Python 3.11+ in CLI setup --- great_docs/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/great_docs/cli.py b/great_docs/cli.py index 7c8f25eb..63bcf082 100644 --- a/great_docs/cli.py +++ b/great_docs/cli.py @@ -1269,6 +1269,8 @@ def setup_github_pages( project_root = Path(project_path) if project_path else Path.cwd() # Auto-detect Python version if not specified + # Great Docs requires Python 3.11+, so we enforce that as the floor + min_great_docs_version = (3, 11) if python_version is None: detected_version = _detect_python_version_from_pyproject(project_root) if detected_version: From f754778760e2390c9aca8cf3304711535775a433 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Wed, 20 May 2026 09:55:52 -0400 Subject: [PATCH 2/2] Enforce min Python version from pyproject --- great_docs/cli.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/great_docs/cli.py b/great_docs/cli.py index 63bcf082..2e3f8da0 100644 --- a/great_docs/cli.py +++ b/great_docs/cli.py @@ -1274,8 +1274,16 @@ def setup_github_pages( if python_version is None: detected_version = _detect_python_version_from_pyproject(project_root) if detected_version: - python_version = detected_version - click.echo(f"📦 Detected Python {python_version} from pyproject.toml") + detected_tuple = tuple(int(x) for x in detected_version.split(".")) + if detected_tuple < min_great_docs_version: + python_version = f"{min_great_docs_version[0]}.{min_great_docs_version[1]}" + click.echo( + f"📦 Project requires Python {detected_version}, " + f"but Great Docs needs >={python_version}; using {python_version}" + ) + else: + python_version = detected_version + click.echo(f"📦 Detected Python {python_version} from pyproject.toml") else: python_version = "3.12" click.echo("📦 Using default Python 3.12 (no requires-python found)")