Skip to content

Conversation

@2bndy5
Copy link
Collaborator

@2bndy5 2bndy5 commented Oct 27, 2025

As of Ubuntu 24.04 LTS, the default version of Python is 3.12. Whereas, Ubuntu 22.04 LTS used Python 3.10, which is reaching End-of-Life next week.

Apparently, I already had created a .python-version file locally, but it was gitignored without my knowledge.

This should helps us control upgrades to Python version while some dependencies, namely pygit2, need extra time to add support for the new Python versions.

It also helps avoid disruption for users that are not aware of our use of a Python venv.

Summary by CodeRabbit

  • Chores
    • Project now explicitly specifies Python 3.12 as the required runtime, ensuring consistent environments.
    • Python runtime specifier is now tracked in version control (no longer ignored).
    • CI triggers updated to respond to changes in the tracked Python version and the project's lockfile instead of the previous requirements file.
    • CI setup updated to use a newer UV tool version for dependency/setup steps.

As of Ubuntu 24.04 LTS, the default version of Python is 3.12. Whereas, Ubuntu 22.04 LTS used Python 3.10, which is reaching End-of-Life next week.

Apparently, I already had created a .python-version file locally, but it was gitignored without my knowledge.

This should helps us control upgrades to Python version while some dependencies, namely `pygit2`, need extra time to add support for the new Python versions.

It also helps avoid disruption for users that are not aware of our use of a Python venv.
@2bndy5 2bndy5 requested a review from a team as a code owner October 27, 2025 21:49
@2bndy5 2bndy5 requested review from shenxianpeng and removed request for a team October 27, 2025 21:49
@2bndy5 2bndy5 added the bug Something isn't working label Oct 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Warning

Rate limit exceeded

@2bndy5 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 7a0a2e5 and c811413.

📒 Files selected for processing (1)
  • .github/workflows/self-test.yml (1 hunks)

Walkthrough

Removed the pyenv ignore block from .gitignore, added a .python-version file specifying Python 3.12, updated the CI workflow triggers to watch .python-version and uv.lock instead of requirements.txt, and bumped UV_VERSION in action.yml from 0.8.11 to 0.9.5.

Changes

Cohort / File(s) Change Summary
Python version config
\.gitignore, \.python-version
Deleted the "# pyenv" block and .python-version entry from .gitignore so .python-version is tracked; added .python-version with content 3.12.
CI workflow triggers
.github/workflows/self-test.yml
Replaced requirements.txt path filters in push, pull_request, and pull_request_target triggers with \.python-version and uv.lock. No other workflow logic changed.
Action setup
action.yml
Updated UV_VERSION used during setup from 0.8.11 to 0.9.5. No other action inputs or steps changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to action.yml UV_VERSION change for compatibility with existing tooling.
  • Confirm uv.lock is the intended lockfile and that triggering on .python-version is desired.
  • Verify adding .python-version to VCS aligns with project policy.

Possibly related PRs

Suggested labels

python

Suggested reviewers

  • shenxianpeng

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: pin Python to 3.12" is clear, specific, and directly aligned with the main objective of the changeset. The title concisely captures the primary action being taken—pinning the repository's Python version to 3.12—which is the core purpose driving all the changes in this PR. All major modifications (removing .python-version from .gitignore, adding the .python-version file, and updating workflow triggers) directly support this objective. The title uses conventional commit formatting with a "fix:" prefix, is concise, and provides meaningful information about the changeset without attempting to cover secondary updates like the UV_VERSION bump, which is acceptable per the evaluation criteria.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v16.0.6) reports: 2 file(s) not formatted
  • docs/examples/demo/demo.hpp
  • docs/examples/demo/demo.cpp
clang-tidy (v16.0.6) reports: 7 concern(s)

Have any feedback or feature suggestions? Share it here.

@2bndy5
Copy link
Collaborator Author

2bndy5 commented Oct 27, 2025

No Python version file found in workspace: /home/runner/work/cpp-linter-action/cpp-linter-action

It looks like this .python-version file is either not present or not getting noticed by uv.

@2bndy5
Copy link
Collaborator Author

2bndy5 commented Oct 27, 2025

No Python version file found in workspace: /home/runner/work/cpp-linter-action/cpp-linter-action

It looks like this .python-version file is either not present or not getting noticed by uv.

Oh that error was from self-test using main branch (pull_request_target event). The .python-version file is indeed being used in self-test on this branch:

Reading Python requests from version file at /Users/runner/work/cpp-linter-action/cpp-linter-action/.python-version

Comment on lines +20 to +27
# pull_request_target:
# branches: [main]
# paths:
# - 'action.yml'
# - '.python-version'
# - 'uv.lock'
# - 'docs/examples/demo/**'
# - '.github/workflows/self-test.yml'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change will not take effect until merged to main.

FYI, it doesn't make sense to use thread-comments and pull_request_target together. Also pull_request and pull_request_target produce duplicate runs, but pull_request_target doesn't run against the proposed changes.

@2bndy5 2bndy5 merged commit d01bd3e into main Oct 28, 2025
73 of 86 checks passed
@2bndy5 2bndy5 deleted the pin-python branch October 28, 2025 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants