From 85371fcc3482e81688475007935a049a179e9bc0 Mon Sep 17 00:00:00 2001 From: FiniteSkills Date: Fri, 3 Jul 2026 08:08:12 +0530 Subject: [PATCH] fix: support Python 3.10 --- .github/workflows/ci.yml | 2 +- README.es.md | 3 ++- README.md | 2 +- pyproject.toml | 6 ++++-- src/becwright/cli.py | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f33bb4b..c05d6bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/README.es.md b/README.es.md index 702f63a..91a99b0 100644 --- a/README.es.md +++ b/README.es.md @@ -77,7 +77,8 @@ npm install --save-dev becwright # local al proyecto; el hook lo encuentra Por npm/pnpm **no hace falta Python** — viene un binario autónomo por plataforma (`linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64`). En -cualquier otra plataforma, usá `pipx install becwright`. +cualquier otra plataforma, usá `pipx install becwright` con Python 3.10 o más +nuevo. ### Sentilo frenar, en 90 segundos diff --git a/README.md b/README.md index cd36cfd..733c005 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ npm install --save-dev becwright # project-local; the hook finds it in node Via npm/pnpm there's **no Python required** — a self-contained binary ships per platform (`linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64`). -On any other platform, use `pipx install becwright`. +On any other platform, use `pipx install becwright` with Python 3.10 or newer. ### Feel it block, in 90 seconds diff --git a/pyproject.toml b/pyproject.toml index 2503f86..6bbd2da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# Packaging for becwright. Target Python 3.12 (current environment has 3.14). +# Packaging for becwright. Target Python 3.10+. # Minimal dependencies on purpose: only pyyaml (project convention). [build-system] requires = ["setuptools>=61"] @@ -9,7 +9,7 @@ name = "becwright" version = "1.0.0" description = "The enforcement layer for AI coding agents — deterministic, portable constraints (BECs) that block a commit when a rule breaks, for AI-written and human-written code." readme = "README.md" -requires-python = ">=3.12" +requires-python = ">=3.10" authors = [{ name = "Alonso David De Leon Rodarte" }] license = { text = "MIT" } keywords = [ @@ -30,6 +30,8 @@ dependencies = ["pyyaml>=6"] classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Environment :: Console", diff --git a/src/becwright/cli.py b/src/becwright/cli.py index 118daf8..b991948 100644 --- a/src/becwright/cli.py +++ b/src/becwright/cli.py @@ -789,7 +789,8 @@ def _print_claude_summary(derived: list[tuple[dict, str]]) -> None: print(_style("From CLAUDE.md:", BOLD), f"{len(derived)} enforceable rule(s) derived —") for rule, trigger in derived: - print(f" {_style(rule['id'], GREEN)} {_style(f'(matched: \"{trigger}\")', DIM)}") + matched = f'(matched: "{trigger}")' + print(f" {_style(rule['id'], GREEN)} {_style(matched, DIM)}") print(_style(" Judgment-based guidance (architecture, naming, style) has no", DIM)) print(_style(" deterministic check — becwright leaves that to CLAUDE.md.", DIM))