Skip to content

fix(coverage): bump coverage.py to 7.10.7 for Python 3.14 support#3592

Closed
slaptijack wants to merge 2 commits intobazel-contrib:mainfrom
slaptijack:slaptijack/cp314-coverage-tool
Closed

fix(coverage): bump coverage.py to 7.10.7 for Python 3.14 support#3592
slaptijack wants to merge 2 commits intobazel-contrib:mainfrom
slaptijack:slaptijack/cp314-coverage-tool

Conversation

@slaptijack
Copy link
Copy Markdown

Why

rules_python coverage support needs to work on Python 3.14, but we also need
to keep Python 3.9 compatibility for users not yet on newer runtimes.

What changed

  • Bumped coverage.py wheel set to 7.10.7 in python/private/coverage_deps.bzl.
  • Updated tools/private/update_deps/update_coverage_deps.py so regenerated
    coverage deps correctly include:
    • cp314 by default
    • wheel platform tags used by newer coverage releases (including freethreaded variants).
  • Kept coverage import-shadowing behavior via python/private/coverage.patch,
    but narrowed patch context so it applies reliably across newer coverage wheel layouts.
  • Added an Unreleased changelog entry in CHANGELOG.md.

Before

  • Python 3.14 coverage support required a newer coverage version, but newer
    versions dropped Python 3.9 support.
  • The update script/platform mapping was stale for newer wheel tags.
  • Patch application was brittle across coverage versions due to wide context.

After

  • Coverage uses 7.10.7, which supports both Python 3.9 and Python 3.14.
  • Update script can regenerate coverage deps for current wheel tag variants.
  • Coverage patch applies robustly while preserving existing behavior.

Testing

  • bazel test //tests/python:python_tests //tests/py_runtime:py_runtime_tests --test_tag_filters=-integration-test
  • Verified Python 3.14 bazel coverage end-to-end in a minimal repro workspace
    using this branch via local_path_override.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @slaptijack, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses the need for rules_python coverage support on Python 3.14 while maintaining backward compatibility with Python 3.9. The changes involve upgrading the coverage.py library to a version that supports the required Python range, updating the dependency management tooling to correctly generate wheels for new Python versions and platform tags, and making a critical patch more resilient to future coverage.py updates. This ensures a seamless and robust coverage experience across diverse Python environments.

Highlights

  • Coverage.py Update: Updated coverage.py to version 7.10.7, ensuring compatibility with both Python 3.9 and Python 3.14.
  • Dependency Update Script Enhancement: Enhanced the coverage dependency update script to correctly include cp314 and support newer wheel platform tags, including freethreaded variants.
  • Patch Refinement: Refined the coverage.patch to narrow its context, making it more robust and reliable across different coverage.py versions.
  • Changelog Entry: Added a new entry to CHANGELOG.md documenting the coverage update.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • CHANGELOG.md
    • Added a changelog entry for the coverage update, specifically noting support for Python 3.14 while retaining Python 3.9 compatibility.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates coverage.py to version 7.10.7 to add support for Python 3.14. The changes include updating dependency definitions, modifying the patch file for better compatibility, and updating the dependency generation script. My review found an issue in the update script where it retains support for Python 3.8, which is no longer supported by the new coverage.py version, causing the script to fail. A fix has been suggested.

@slaptijack slaptijack force-pushed the slaptijack/cp314-coverage-tool branch from 6d83163 to db042d8 Compare February 13, 2026 04:57
@slaptijack slaptijack marked this pull request as ready for review February 13, 2026 05:06
@slaptijack slaptijack closed this Feb 13, 2026
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.

1 participant