-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: update support Python versions #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes in this pull request involve updates to the configuration files for a project. The Python versions in the CI testing matrix have been expanded to include versions 3.9, 3.10, 3.11, 3.12, and 3.13. Additionally, a new badge indicating the supported Python version has been added to the Changes
Sequence Diagram(s)sequenceDiagram
participant CI as Continuous Integration
participant Repo as Repository
participant User as Developer
User->>Repo: Push changes
Repo->>CI: Trigger workflow
CI->>CI: Run tests on Python 3.9, 3.10, 3.11, 3.12, 3.13
CI-->>User: Test results
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (3)cpp_linter/clang_tools/patcher.py (3)
The simplified assignment of
The ✅ Verification successfulKeep the type ignore comment The
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if pygit2 has type hints in newer versions
# This will help determine if the type ignore comment is still necessary
# Check if there are any stub files for pygit2
fd -e pyi "pygit2"
# Check if pygit2 package has type hints
rg -l "from typing import" -g "pygit2/**/*.py"
Length of output: 216 Script: #!/bin/bash
# Let's check if mypy reports any issues with the pygit2 import
# Create a temporary file for mypy check
echo 'from pygit2.enums import DiffOption' > /tmp/test_import.py
mypy /tmp/test_import.py
# Let's also check how this import is handled in other files
rg "from pygit2.*import.*DiffOption" -A 2 -B 2
# Check if there are any other type: ignore comments for pygit2
rg "pygit2.*# type: ignore"
Length of output: 968
Since we're updating Python version support to include 3.12 and 3.13, we should verify that the pygit2 library is compatible with these versions. ✅ Verification successfulLet me gather more information about the pygit2 dependency and its version constraints. No compatibility concerns with pygit2 for Python version update The codebase already has fallback mechanisms for pygit2 issues (as seen in
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check pygit2 version constraints and Python compatibility
# Check if pyproject.toml specifies pygit2 version
rg "pygit2" pyproject.toml
# Check for any version-specific imports or compatibility code
rg -A 5 "import.*pygit2"
Length of output: 508 Script: #!/bin/bash
# Check for dependency specifications in setup.py, setup.cfg, or requirements files
fd -e txt -e cfg -e py "setup|requirements" --exec rg "pygit2"
# Check Python version constraints in pyproject.toml
rg "python" pyproject.toml
# Look for any version-specific handling or imports of pygit2
rg -g "!*.{json,md}" "pygit2" .
Length of output: 1971 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
pyproject.toml (1)
15-17
: Fix inconsistent spacing around the new fieldThe new
requires-python
field has inconsistent spacing around it. Consider removing the extra blank lines to maintain consistent spacing with other fields in the section.authors = [ { name = "Brendan Doherty", email = "2bndy5@gmail.com" }, { name = "Peter Shen", email = "xianpeng.shen@gmail.com" }, ] - - requires-python = ">=3.9" - classifiers = [.github/workflows/run-dev-tests.yml (1)
44-44
: Consider Python 3.13 testing strategyPython 3.13 is currently in development (alpha stage). While it's good to test against future versions, there are some considerations:
- It might cause unstable test results
- Some dependencies might not work with 3.13 yet
- GitHub Actions runners might not have stable support for 3.13
Consider either:
- Adding
continue-on-error: true
for Python 3.13 jobs- Or waiting until Python 3.13 reaches beta/RC stage
matrix: - py: ['3.9', '3.10', '3.11', '3.12', '3.13'] + py: ['3.9', '3.10', '3.11', '3.12'] + include: + - py: '3.13' + continue-on-error: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/run-dev-tests.yml
(1 hunks)README.rst
(2 hunks)pyproject.toml
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- README.rst
🔇 Additional comments (1)
.github/workflows/run-dev-tests.yml (1)
44-44
: Verify GitHub Actions runner compatibility
Let's verify that the selected GitHub Actions runners support Python 3.12 and 3.13.
✅ Verification successful
Python 3.12 and 3.13 are supported by the workflow configuration
The workflow uses actions/setup-python@v5
which officially supports Python 3.12 and 3.13-dev (as of December 2024). The workflow runs on ubuntu-22.04
and windows-latest
, both of which are compatible with these Python versions through the setup-python action. The matrix configuration is correctly set up to test across all specified Python versions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check GitHub Actions runner images for Python version support
# Query GitHub API for runner image details
gh api graphql -f query='
{
repository(owner: "actions", name: "runner-images") {
object(expression: "main") {
... on Commit {
tree {
entries {
name
object {
... on Tree {
entries {
name
object {
... on Blob {
text
}
}
}
}
}
}
}
}
}
}
}' | jq -r '.data.repository.object.tree.entries[] | select(.name | test("(ubuntu|windows).*")).name'
Length of output: 610
Script:
#!/bin/bash
# Let's check the workflow file to understand which runner is being used
cat .github/workflows/run-dev-tests.yml
Length of output: 3433
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a little afraid because Ubuntu 20.04 LTS uses 3.8 by default, but that was bumped to 3.10 in Ubuntu 22.04.
Co-authored-by: Brendan <2bndy5@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Like this 9eeb03b? |
By the way. setup.py seems useless now since we have pyproject.toml, do you think I can remove it? |
Yeah! Let's see if the tests pass.
I'm leaving it there in case people try to install with an older version of pip (that does not support the latest PEPs). Since this is technically a minor version bump, I'd like to get this released with #131 feature as well (in v1.11.0). |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #134 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 1873 1869 -4
=========================================
- Hits 1873 1869 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Since Python 3.8 has already end of life (2024-10-07) https://devguide.python.org/versions
We might need to drop support it and also include Python 3.12 and 3.13
Summary by CodeRabbit
New Features
Chores