feat: update support Python versions by shenxianpeng · Pull Request #134 · cpp-linter/cpp-linter · GitHub
Skip to content

feat: update support Python versions#134

Merged
shenxianpeng merged 5 commits into
mainfrom
update-python-version
Dec 13, 2024
Merged

feat: update support Python versions#134
shenxianpeng merged 5 commits into
mainfrom
update-python-version

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Dec 13, 2024

Copy link
Copy Markdown
Member

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

    • Added a Python version badge to the README, indicating supported Python versions.
    • Updated project metadata to specify a minimum required Python version of 3.9.
  • Chores

    • Expanded the range of Python versions tested in the CI workflow to include versions 3.9 through 3.13.
    • Modified the order of badges in the README to include the new Python version badge.
    • Corrected the author's name in project metadata.

@shenxianpeng shenxianpeng added the enhancement New feature or request label Dec 13, 2024
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Dec 13, 2024
@coderabbitai

coderabbitai Bot commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 field

The 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 strategy

Python 3.13 is currently in development (alpha stage). While it's good to test against future versions, there are some considerations:

  1. It might cause unstable test results
  2. Some dependencies might not work with 3.13 yet
  3. 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

📥 Commits

Reviewing files that changed from the base of the PR and between d6bfbcc and 0c64196.

📒 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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c64196 and 14d0052.

📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)

Comment thread pyproject.toml
Comment thread pyproject.toml

@2bndy5 2bndy5 left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread pyproject.toml Outdated
Comment thread README.rst
shenxianpeng and others added 2 commits December 13, 2024 17:25
Co-authored-by: Brendan <2bndy5@gmail.com>
@2bndy5 2bndy5 added the minor A minor version bump label Dec 13, 2024
@2bndy5

This comment was marked as resolved.

@shenxianpeng

Copy link
Copy Markdown
Member Author

Like this 9eeb03b?

@shenxianpeng

Copy link
Copy Markdown
Member Author

By the way. setup.py seems useless now since we have pyproject.toml, do you think I can remove it?

@2bndy5

2bndy5 commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

Like this 9eeb03b?

Yeah! Let's see if the tests pass.

setup.py seems useless now since we have pyproject.toml, do you think I can remove it?

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

codecov Bot commented Dec 13, 2024

Copy link
Copy Markdown

@shenxianpeng shenxianpeng requested a review from 2bndy5 December 13, 2024 16:18
@shenxianpeng shenxianpeng merged commit 239d6b8 into main Dec 13, 2024
@shenxianpeng shenxianpeng deleted the update-python-version branch December 13, 2024 16:29
@shenxianpeng shenxianpeng removed documentation Improvements or additions to documentation minor A minor version bump labels Jan 31, 2025
@shenxianpeng shenxianpeng changed the title feat: update support python versions feat: update support Python versions Mar 30, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Sep 4, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants