Skip to content
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

feat: add support for Python 3.13 and drop 3.8 #24

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

fschuch
Copy link
Owner

@fschuch fschuch commented Nov 11, 2024

Summary by CodeRabbit

  • New Features
    • Updated CI workflow to include Python 3.13 for testing.
  • Documentation
    • Revised README.md to clarify setup instructions and updated minimum Python version from 3.8 to 3.9, including dependency version specifications.
  • Chores
    • Modified pyproject.toml to reflect updated Python version requirements and support for Python 3.13.

Copy link

coderabbitai bot commented Nov 11, 2024

Walkthrough

The changes in this pull request involve updates to the CI workflow, README.md, and pyproject.toml files. The CI workflow has modified the Python version matrix by adding Python 3.13 and removing Python 3.8. The README.md file has been updated to reflect changes in minimum dependency versions and improve clarity regarding project setup. Similarly, the pyproject.toml file now specifies a minimum Python version of 3.9 and updates the supported Python versions accordingly. Overall, these changes ensure compatibility with newer Python versions and enhance documentation clarity.

Changes

File Change Summary
.github/workflows/ci.yaml Updated python-version in job test from ["3.8", "3.9", "3.10", "3.11", "3.12"] to ["3.9", "3.10", "3.11", "3.12", "3.13"].
README.md Changed minimum Python version from 3.8 to 3.9; updated dependencies to specify minimum versions for coverage, pre-commit, pytest, pytest-cov, docutils, jupyter-book, sphinx-autobuild, and sphinx.
pyproject.toml Updated requires-python from >=3.8 to >=3.9; removed classifier for Python 3.8 and added for Python 3.13; updated Python version matrix from ["3.8", "3.9", "3.10", "3.11", "3.12"] to ["3.9", "3.10", "3.11", "3.12", "3.13"].

Poem

In the garden where bunnies play,
Python's versions lead the way.
From 3.8, we bid farewell,
To 3.13, we now can dwell.
With clearer paths and dependencies bright,
Our coding hops take joyful flight! 🐇✨


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
pyproject.toml (1)

Line range hint 14-24: Consider reordering Python version classifiers.

The version changes are correct, but the classifiers could be more readable if ordered sequentially.

     "Intended Audience :: Developers",
     "License :: OSI Approved :: MIT License",
     "Operating System :: OS Independent",
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
     "Programming Language :: Python :: 3.12",
-    "Programming Language :: Python :: 3.13",
-    "Programming Language :: Python :: 3.9",
-    "Programming Language :: Python :: 3",
-    "Programming Language :: Python",
+    "Programming Language :: Python :: 3.13"
README.md (1)

Line range hint 279-281: LGTM: Good references for Python version support decisions

The section provides valuable references to official Python version status and NEP 29 for making informed decisions about version support.

Consider adding a link to Python's Status of Python Branches for more detailed information about Python version support timelines.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 357c6b8 and b9ac32e.

📒 Files selected for processing (3)
  • .github/workflows/ci.yaml (1 hunks)
  • README.md (2 hunks)
  • pyproject.toml (3 hunks)
🔇 Additional comments (5)
.github/workflows/ci.yaml (1)

41-41: ⚠️ Potential issue

Review Python version matrix changes

The changes raise two concerns:

  1. The addition of Python 3.13 is not mentioned in the PR objective which only states "add support for Python 3.12 and drop 3.8"
  2. Python 3.13 is currently in alpha stage and might be unstable. Consider waiting for its stable release before adding it to the test matrix.

Let's verify the Python 3.13 release status:

Suggested changes:

-        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+        python-version: ["3.9", "3.10", "3.11", "3.12"]
pyproject.toml (1)

11-11: LGTM: Minimum Python version requirement updated correctly.

The change from ">=3.8" to ">=3.9" aligns with the PR objective to drop Python 3.8 support.

README.md (3)

40-58: LGTM: Dependencies updated with specific version constraints

The default environment dependencies have been updated with explicit minimum version requirements, which is a good practice for dependency management.


156-156: LGTM: Clear Python version requirement statement

The statement clearly communicates the new minimum Python version requirement of 3.9 and provides good guidance about using the latest stable version.


60-73: Verify Python version compatibility claims

The test matrix has been updated to include Python 3.12 and 3.13 while removing 3.8. Let's verify this aligns with the project configuration.

✅ Verification successful

Python version configuration is consistent across the project

The test matrix changes align perfectly with the project's configuration:

  • pyproject.toml specifies requires-python = ">=3.9", confirming the removal of Python 3.8 support
  • CI workflow in .github/workflows/ci.yaml includes all test matrix versions: 3.9, 3.10, 3.11, 3.12, and 3.13
  • The test environments listed in the README table match exactly with the CI matrix Python versions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Python version configuration consistency across the project

# Check pyproject.toml for Python version requirements
echo "Checking Python version requirements in pyproject.toml..."
rg "requires-python|python_version" pyproject.toml

# Check CI workflow for Python versions
echo -e "\nChecking Python versions in CI workflow..."
rg "python-version" .github/workflows/

Length of output: 1034

@@ -108,7 +108,7 @@ extra-dependencies = ["pytest-randomly", "pytest-rerunfailures", "pytest-xdist"]
extended = "test -n auto --reruns 7 --reruns-delay 1 {args}"

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Python 3.13 is not yet supported in GitHub Actions

While Python 3.13 is included in the test matrix, it's currently not available in GitHub Actions. The latest available version is 3.14.0-alpha, but it's an unstable development version. The workflows are currently using Python 3.12, which is the latest stable version.

  • Remove Python 3.13 from the test matrix in pyproject.toml as it's not yet supported
  • Consider re-adding it once it becomes available in GitHub Actions setup-python action
🔗 Analysis chain

Verify Python 3.13 availability in CI environment.

The test matrix updates correctly reflect the version changes, but since Python 3.13 is still in development, we should verify its availability in the CI environment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if GitHub Actions supports Python 3.13
gh api repos/actions/python-versions/releases/latest --jq '.tag_name' || \
  echo "Failed to fetch Python versions. Please verify Python 3.13 support in your CI environment manually."

Length of output: 96


Script:

#!/bin/bash
# Check GitHub Actions workflow files for Python setup
fd -e yml -e yaml . .github/workflows/ -x cat {} \; | grep -A 5 "setup-python"

Length of output: 932

@fschuch fschuch merged commit 0facecd into main Nov 11, 2024
24 checks passed
@fschuch fschuch changed the title feat: add support for Python 3.12 and drop 3.8 feat: add support for Python 3.13 and drop 3.8 Nov 11, 2024
@fschuch fschuch deleted the fschuch/add-support-to-python-3-13-and-drop-3-8 branch December 17, 2024 14:09
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