Skip to content

Python 3.14 within template#110

Merged
ejfine merged 9 commits intomainfrom
misc-next
Nov 10, 2025
Merged

Python 3.14 within template#110
ejfine merged 9 commits intomainfrom
misc-next

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented Nov 10, 2025

Link to Issue or Message thread

#107

Why is this change necessary?

Start supporting Python 3.14

How does this change address the issue?

Adds it as a question

What side effects does this change have?

N/A

How is this change tested?

Python package template

Summary by CodeRabbit

  • New Features

    • Added Python 3.14.0 support for CI testing.
    • Added OpenIssues badge to documentation.
  • Chores

    • Updated pnpm from 10.20.0 to 10.21.0.
    • Updated pytest from 8.4.2 to 9.0.0.
    • Updated devcontainer configuration.
    • Excluded auto-generated API client code from test coverage reports.
  • Documentation

    • Updated setup instructions with improved build configuration.

@ejfine ejfine self-assigned this Nov 10, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Walkthrough

The pull request adds Python 3.14.0 support across configuration files, bumps pnpm and pytest versions, excludes auto-generated OpenAPI client code from coverage, updates README documentation with OpenIssues badges, and refreshes the DevContainer context hash.

Changes

Cohort / File(s) Summary
Python 3.14 Support Addition
copier.yaml, template/copier.yml.jinja-base, template/extensions/context.py.jinja-base, tests/copier_data/data2.yaml
Adds "3.14.0" as a new Python version option to CI configuration and test data; replaces py311_version with py314_version in context updates.
Dependency and Tool Version Updates
extensions/context.py, pyproject.toml
Upgrades pnpm from 10.20.0 to 10.21.0, pytest from 8.4.2 to 9.0.0, and adds py314_version context entry.
Generated Code Exclusion
.coveragerc
Adds */generated/open_api/* omission pattern to exclude auto-generated OpenAPI client code from coverage reporting.
Documentation Updates
README.md, template/README.md.jinja-base
Adds OpenIssues badge line; updates lock file generation instructions with --skip-updating-devcontainer-hash flag and explicit git staging of modified devcontainer config.
DevContainer Configuration
.devcontainer/devcontainer.json
Updates context hash comment from 53d51a57 to 43411b4a.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Most changes follow repetitive patterns (version bumps and configuration additions across similar file types)
  • Coverage exclusion and badge additions are straightforward configuration changes
  • Minimal logic complexity; primarily declarative updates

Possibly related PRs

  • OpenAPI codegen support #102 — Modifies extensions/context.py for template context version keys and adds exclusions for generated OpenAPI client code.
  • More kiota support #103 — Updates coverage and pre-commit configuration to exclude the same generated/open_api directory paths.
  • Claude code feature #99 — Updates version constants (pnpm and pytest) in extensions/context.py and related template files.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Python 3.14 within template' clearly and concisely summarizes the main change: adding Python 3.14 support to the template.
Description check ✅ Passed The pull request description follows the required template structure with all sections completed: issue link, rationale, solution approach, side effects, and testing method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ejfine ejfine requested a review from Copilot November 10, 2025 15:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates testing dependencies and adds support for Python 3.14.0 across the copier template configuration. The main changes include upgrading pytest from version 8.4.2 to 9.0.0, adding Python 3.14.0 as a supported CI version option, updating pnpm to 10.21.0, adding a new maintenance badge to README files, and expanding coverage exclusions for auto-generated API client code.

Key Changes:

  • Upgrades pytest from 8.4.2 to 9.0.0 with updated lock file hashes
  • Adds Python 3.14.0 support alongside existing 3.12.7 and 3.13.2 versions (removes 3.11 support)
  • Updates pnpm from 10.20.0 to 10.21.0

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Updates pytest package to version 9.0.0 with new hashes and source URLs
tests/copier_data/data2.yaml Adds Python 3.14.0 to test CI version matrix
template/extensions/context.py.jinja-base Removes py311_version context variable and adds py314_version
template/copier.yml.jinja-base Adds Python 3.14.0 as a choice in the multiselect for CI versions
template/README.md.jinja-base Adds OpenIssues badge from isitmaintained.com
pyproject.toml Updates pytest dependency requirement to >=9.0.0
extensions/context.py Updates pnpm to 10.21.0, pytest to 9.0.0, and adds py314_version = "3.14.0"
copier.yaml Adds Python 3.14.0 as a choice for python_ci_versions
README.md Adds OpenIssues badge and updates setup instructions with additional flag
.devcontainer/devcontainer.json Updates devcontainer context hash from 53d51a57 to 43411b4a
.coveragerc Adds exclusion pattern for auto-generated OpenAPI client code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6d50f9 and ae91caa.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .coveragerc (1 hunks)
  • .devcontainer/devcontainer.json (1 hunks)
  • README.md (1 hunks)
  • copier.yaml (1 hunks)
  • extensions/context.py (2 hunks)
  • pyproject.toml (1 hunks)
  • template/README.md.jinja-base (1 hunks)
  • template/copier.yml.jinja-base (1 hunks)
  • template/extensions/context.py.jinja-base (1 hunks)
  • tests/copier_data/data2.yaml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ...prepare for commit (git add .) 1. Run `python3 .github/workflows/hash_git_files.py . --for-dev...

(GITHUB)

🪛 markdownlint-cli2 (0.18.1)
README.md

9-9: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🔇 Additional comments (7)
.devcontainer/devcontainer.json (1)

64-64: LGTM!

The context hash update is automatically managed by the pre-commit hook and reflects the changes in this PR.

tests/copier_data/data2.yaml (1)

5-8: LGTM!

The test data correctly reflects the addition of Python 3.14.0 support and is consistent with the choices in copier.yaml.

copier.yaml (1)

29-36: Python 3.14.0 verified as officially released and stable.

Python 3.14.0 was officially released as a stable version on October 7, 2025, making it appropriate for the instantiated template's CI configuration. The code change is correct and ready.

template/extensions/context.py.jinja-base (1)

99-101: Document Python 3.11 support removal explicitly in PR description.

The removal of py311_version is intentional and follows a rolling 3-version support strategy (3.12, 3.13, 3.14). No internal code dependencies exist on py311_version, so this change is safe within the repository. However, this is a breaking change for downstream consumers of this template.

Ensure the PR description explicitly states: "Drops Python 3.11 support by removing py311_version and adding py314_version as part of rolling version updates."

template/copier.yml.jinja-base (1)

65-66: LGTM! Consistent with context changes.

The addition of py314_version as a CI choice is properly structured and consistent with the context variable added in extensions/context.py. This allows users to select Python 3.14 for CI testing when instantiating the template.

However, the same caveat applies: ensure Python 3.14.0 is available as a stable release before merging (see comment on extensions/context.py line 112).

extensions/context.py (2)

112-112: Python 3.14.0 has been officially released as stable (October 7, 2025).

The version is correctly added to both extensions/context.py (line 112) and copier.yaml (line 36), and is included in the test data at tests/copier_data/data2.yaml. The changes are consistent and properly synchronized.

Note: The comment on line 110 references tests/data.yml, which doesn't exist in the repository—the actual test data files are at tests/copier_data/data1.yaml and data2.yaml. Consider updating this comment for accuracy.


23-23: Review pytest 9.0.0 breaking changes and ensure template compatibility.

pytest 9.0.0 was released on Nov 8, 2025. Review these breaking changes for impact on your template or generated projects:

  • Python 3.9 support dropped
  • CI mode now requires CI/BUILD_NUMBER env vars to be defined and non-empty
  • Duplicate file path arguments are deduplicated (only prefix remains)
  • PytestRemovedIn9Warning deprecations are now errors by default
  • --junitxml no longer prints XML summary at session end when --quiet is given

Verify your template's Python version requirements, CI configuration, and test invocation patterns handle these changes.

Comment on lines +6 to +7
# omit any auto-generated API client code
*/generated/open_api/*
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Unrelated but reasonable change.

This coverage exclusion for auto-generated OpenAPI client code is sensible but appears unrelated to the stated PR objective of adding Python 3.14 support. Consider separating unrelated changes into their own PRs for clearer history and easier review.

🤖 Prompt for AI Agents
In .coveragerc around lines 6 to 7, the addition of the coverage exclusion
pattern "*/generated/open_api/*" is unrelated to the Python 3.14 support PR;
revert this change from the current branch and create a separate PR that
documents and justifies excluding auto-generated OpenAPI client code (or
conversely, move only the Python 3.14 changes into this PR and leave the
.coveragerc change for its own commit/PR) so the history and review remain
focused and atomic.

context["copier_template_extensions_version"] = "0.3.3"
#######
context["pnpm_version"] = "10.20.0"
context["pnpm_version"] = "10.21.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that pnpm version 10.21.0 exists.

The version bump looks reasonable.


🌐 Web query:

Does pnpm version 10.21.0 exist?

💡 Result:

Short answer: Not as an official pnpm release — the official GitHub releases and npm registry show up to v10.20.x, while Chocolatey lists a pnpm 10.21.0 package published Nov 10, 2025 (likely a repackaged build). See: GitHub releases (latest v10.20.0). [1] npm package page (latest shown v10.15.1 at time of crawl). [2] Chocolatey package page (pnpm 10.21.0 listed 2025-11-10). [3]

Sources:
[1] https://github.com/pnpm/pnpm/releases
[2] https://www.npmjs.com/package/pnpm?activeTab=versions
[3] https://community.chocolatey.org/packages/pnpm


Revert pnpm version to 10.20.0 — v10.21.0 does not exist as an official release.

pnpm v10.21.0 is not an official GitHub release, with official releases only going up to v10.20.x. v10.21.0 only appears on Chocolatey as a repackaged build published Nov 10, 2025. Use the latest official version v10.20.0 instead.

🤖 Prompt for AI Agents
In extensions/context.py around line 20, the pnpm_version was set to "10.21.0"
but that release does not exist officially; change the value back to the latest
official release "10.20.0" (i.e., replace "10.21.0" with "10.20.0") and,
optionally, add a short inline comment noting why we pin to 10.20.0 to avoid
referencing non-official repackaged builds.

requires-python = ">=3.12.7"
dependencies = [
"pytest>=8.4.2",
"pytest>=9.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify pytest 9.0.0 compatibility with Python 3.14.

The major version bump from pytest 8.4.2 to 9.0.0 should be verified for Python 3.14 compatibility and to ensure it's a stable release suitable for production use.


🌐 Web query:

What is the latest stable version of pytest and does pytest 9.0.0 support Python 3.14?

💡 Result:

Latest stable pytest (as of Nov 10, 2025) is 8.4.2. [1][2]

There is no official pytest 9.0.0 release on the project GitHub/PyPI as of this date, so you cannot rely on a published "pytest 9.0.0" compatibility claim. pytest 8.4.2 includes fixes for Python 3.14-related issues (so pytest works with Python 3.14 in current releases), but there is no released pytest 9.0.0 to confirm separate support. [2][3]

Sources:

  • PyPI pytest release page (shows 8.4.2). [1]
  • pytest GitHub releases / 8.4.2 changelog (notes fixes for Python 3.14). [2]
  • pytest docs — Python version support / compatibility policy. [3]

Revert pytest requirement to 8.4.2 — version 9.0.0 does not exist.

The latest stable version of pytest (as of Nov 10, 2025) is 8.4.2, and there is no official pytest 9.0.0 release. Specifying pytest>=9.0.0 will cause installation failures since the dependency cannot be resolved. Change line 8 to "pytest>=8.4.2" or "pytest==8.4.2" depending on your versioning strategy. pytest 8.4.2 includes fixes for Python 3.14, so it fully supports Python 3.14 compatibility.

🤖 Prompt for AI Agents
In pyproject.toml around line 8, the pytest requirement is incorrectly set to
"pytest>=9.0.0" (which does not exist) causing install failures; change that
entry to a valid release such as "pytest>=8.4.2" or pin to "pytest==8.4.2"
depending on whether you want a minimum or exact version, then run a dependency
install to verify resolution.

[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![Actions status](https://github.com/LabAutomationAndScreening/copier-base-template/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/LabAutomationAndScreening/copier-base-template/actions)
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/LabAutomationAndScreening/copier-base-template)
[![OpenIssues](http://isitmaintained.com/badge/open/LabAutomationAndScreening/copier-base-template.svg)](http://isitmaintained.com/project/LabAutomationAndScreening/copier-base-template)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Unrelated documentation enhancement.

Similar to the template README, this badge addition is unrelated to Python 3.14 support.

🤖 Prompt for AI Agents
In README.md around line 7, the added open-issues badge is an unrelated
documentation change for this branch (which is meant to focus on Python 3.14
support); remove the badge line from this commit/PR so the diff only contains
Python-3.14-related changes (either revert that line, move the badge addition to
a separate documentation-only branch/PR, or create a separate commit that is
omitted from this review).

Comment on lines +14 to +17
1. Run `python .devcontainer/manual-setup-deps.py --only-create-lock --allow-uv-to-install-python --skip-updating-devcontainer-hash` to generate the lock file(s)
1. Stage all files to prepare for commit (`git add .`)
1. Run `python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update` to update the hash for your devcontainer file
1. Commit the changes (optional)
1. Commit the changes (optional). Ensure to stage the modified `.devcontainer/devcontainer.json` file: `git add .devcontainer/devcontainer.json`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Improved workflow instructions.

These updates to the instantiation workflow are helpful but unrelated to the PR's stated objective of adding Python 3.14 support. The instructions themselves look correct and improve the user experience.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~16-~16: The official name of this software platform is spelled with a capital “H”.
Context: ...prepare for commit (git add .) 1. Run `python3 .github/workflows/hash_git_files.py . --for-dev...

(GITHUB)

🤖 Prompt for AI Agents
In README.md around lines 14 to 17, the added instantiation workflow
instructions are correct but unrelated to the PR objective (adding Python 3.14);
remove them from this PR by moving the changes into a separate commit/PR (or
revert them here and re-apply in a focused PR), then update this branch to only
include Python 3.14-related edits so the current PR stays focused.

[![Actions status](https://www.github.com/{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %}/actions/workflows/ci.yaml/badge.svg?branch=main)](https://www.github.com/{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %}/actions)
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://www.github.com/{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %})

[![OpenIssues](http://isitmaintained.com/badge/open/{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %}.svg)](http://isitmaintained.com/project/{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Unrelated documentation enhancement.

The OpenIssues badge addition is a useful documentation improvement but is unrelated to the PR's Python 3.14 support objective. Consider grouping related changes together in future PRs.

🤖 Prompt for AI Agents
In template/README.md.jinja-base around line 5, the OpenIssues badge change is
unrelated to the Python 3.14 support PR; revert or remove this badge addition
from this branch and either place it in a separate commit/PR or keep it out of
this change set so the current PR remains focused on Python 3.14 support.

@ejfine ejfine merged commit baeab36 into main Nov 10, 2025
12 checks passed
@ejfine ejfine mentioned this pull request Nov 10, 2025
1 task
@ejfine ejfine deleted the misc-next branch November 10, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants