From e4a23037acf4e4ecbe7ec98941edae595d0d5e0c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Nov 2025 07:20:05 +0000 Subject: [PATCH 1/2] feat: Bump template to ludic 1.0.0 with Python 3.14 and t-strings - Update ludic dependency to version 1.0.0+ - Upgrade Python requirement from 3.12 to 3.14 - Convert f-strings to t-strings (new Python 3.14 feature) - Update GitHub Actions workflow to test with Python 3.14 - Add README instructions for using old template version with --checkout 0.5 --- .github/workflows/test.yml | 2 +- README.md | 12 ++++++++++++ {{ cookiecutter.project_slug }}/pyproject.toml | 6 +++--- {{ cookiecutter.project_slug }}/src/components.py | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa688ed..d03a29d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.13"] + python-version: ["3.14"] steps: - name: Checkout repository diff --git a/README.md b/README.md index e827b4c..29a54a4 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,15 @@ Or you can use [UV](https://docs.astral.sh/uv/) to run cookiecutter: ```bash uvx cookiecutter gh:getludic/template ``` + +**Note:** This template uses Ludic 1.0.0+ which requires Python 3.14+ and uses t-strings. If you need to create a project with Ludic 0.5.x, use the 0.5 tag: + +```bash +cookiecutter gh:getludic/template --checkout 0.5 +``` + +Or with UV: + +```bash +uvx cookiecutter gh:getludic/template --checkout 0.5 +``` diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 3ff755e..f10522f 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -7,10 +7,10 @@ authors = [ ] readme = "README.md" dependencies = [ - "ludic[full]", + "ludic[full]>=1.0.0", "uvicorn", ] -requires-python = ">=3.12" +requires-python = ">=3.14" [tool.uv] dev-dependencies =[ @@ -33,7 +33,7 @@ include = ["src", "README.md", "pyproject.toml"] packages = ["src"] [tool.mypy] -python_version = "3.13" +python_version = "3.14" strict = true disallow_subclassing_any = false plugins = "ludic.mypy_plugin" diff --git a/{{ cookiecutter.project_slug }}/src/components.py b/{{ cookiecutter.project_slug }}/src/components.py index b534586..6e164d3 100644 --- a/{{ cookiecutter.project_slug }}/src/components.py +++ b/{{ cookiecutter.project_slug }}/src/components.py @@ -15,4 +15,4 @@ class Hello(Component[NoChildren, HelloAttrs]): @override def render(self) -> Box: - return Box(f"Hello, {b(self.attrs["name"])}! This is a sample component.") + return Box(t"Hello, {b(self.attrs["name"])}! This is a sample component.") From d57b9dab3b9b0377d934064510ec2b7716aa65bb Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Nov 2025 07:22:56 +0000 Subject: [PATCH 2/2] fix: Disable mypy misc check for t-strings and update to dependency-groups - Add disable_error_code for misc to suppress PEP 750 t-string warnings in mypy - Replace deprecated tool.uv.dev-dependencies with dependency-groups.dev --- {{ cookiecutter.project_slug }}/pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index f10522f..8b4ddd8 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -12,8 +12,8 @@ dependencies = [ ] requires-python = ">=3.14" -[tool.uv] -dev-dependencies =[ +[dependency-groups] +dev = [ "mypy", "pytest", "httpx", @@ -37,6 +37,7 @@ python_version = "3.14" strict = true disallow_subclassing_any = false plugins = "ludic.mypy_plugin" +disable_error_code = ["misc"] [tool.pytest.ini_options] testpaths = "tests"