ci: Drop EOL Python 3.9 and macos-13#948
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes support for the end-of-life Python 3.9 and updates the CI/CD configuration. However, there is a critical issue: the PR incorrectly references Python 3.14, which does not exist yet (the latest stable version as of November 2025 is Python 3.13).
Key Changes
- Updates minimum Python version from 3.9 to 3.10 across configuration files
- Modernizes type hints using Python 3.10+ pipe operator syntax (
|instead ofUnion) - Attempts to update CI test matrix to use Python 3.14 (which is incorrect)
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Removes Python 3.9 classifier and updates minimum required version to 3.10 |
| ruff.toml | Updates target version from py39 to py310 |
| .mypy.ini | Updates python_version from 3.9 to 3.10 |
| src/pre_commit_terraform/_types.py | Replaces Union[ReturnCode, int] with modern ReturnCode | int syntax compatible with Python 3.10+ |
| .pre-commit-config.yaml | Updates MyPy hooks configuration - incorrectly changes from 3.13/3.11/3.9 to 3.14/3.12/3.10 |
| .github/workflows/ci-cd.yml | Updates test matrix - incorrectly changes highest version from 3.13 to 3.14, replaces macos-13 with macos-15-intel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Must be a Cloudflare issue. Let's wait a day |
| # Assume Python 3.9 | ||
| target-version = "py39" | ||
| # Assume Python 3.10 | ||
| target-version = "py310" |
There was a problem hiding this comment.
Isn't this inherited from pyproject.toml's [project].requires-python?
There was a problem hiding this comment.
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughUpdated project configuration and CI to target newer Python/macOS versions and modernized a type alias to PEP 604 union syntax. Changes touch CI workflow, linters/pre-commit, packaging metadata, and a single internal types file; no public API signatures were modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
| name: MyPy, for Python 3.10 | ||
| additional_dependencies: | ||
| - lxml # dep of `--txt-report`, `--cobertura-xml-report` & `--html-report` | ||
| - pytest |
There was a problem hiding this comment.
It might be a good idea to start pinning the additional deps in here. Both these and the repo version contribute to the cache key in pre-commit. And the cache in https://pre-commit.ci is effectively immportal. So when a new version of a dep like pytest is out, pre-commit.ci won't start using it until the cache key changes. That can happen when the repo version above changes or when something in this list of strings changes. This results in updating the repo version suddenly starting to use a different pytest version way later than its actual release happens. Having pins in here gives you better control over when the new versions are being picked up and so you'd see failures when you bump things in here instead of seeing failures at some point later, when the repo is getting bumped by the bot.
One project that can manage these is https://pypi.org/p/upadup.
Yep, that's happening to all my CI runs. All the hosts behind their CDN return HTTP 500: https://cloudflarestatus.com. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #948 +/- ##
=======================================
Coverage 96.55% 96.55%
=======================================
Files 10 10
Lines 261 261
Branches 7 7
=======================================
Hits 252 252
Misses 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
|
This PR is included in version 1.104.0 🎉 |
Description of your changes
Deal with issues highlighted in #947