Skip to content

fix: align Python version requirements across documentation and configuration#140

Open
Junio243 wants to merge 3 commits intoalibaba:mainfrom
Junio243:fix/python-version-consistency
Open

fix: align Python version requirements across documentation and configuration#140
Junio243 wants to merge 3 commits intoalibaba:mainfrom
Junio243:fix/python-version-consistency

Conversation

@Junio243
Copy link
Contributor

Problem

There is an inconsistency between the documented Python version support and the actual wheel availability:

  • README.md states: "Python 3.10 - 3.12"
  • pyproject.toml declares: requires-python = ">=3.9"
  • CONTRIBUTING.md states: "Python ≥ 3.9"
  • PyPI wheels are only built for: cp310, cp311, cp312
  • No source distribution (sdist) is available on PyPI

User Impact

This creates a frustrating experience:

  1. Users with Python 3.9 see "Requires: Python >=3.9" on PyPI and assume it's supported
  2. When they try to install, they get "No matching distribution found" because:
    • Only wheels for 3.10-3.12 exist
    • No source distribution is available to compile from source
  3. The error message is confusing and doesn't clearly explain why installation failed

Solution

This PR aligns all Python version declarations to accurately reflect the actual supported versions:

Changes Made

  1. pyproject.toml

    • Changed requires-python = ">=3.9" to requires-python = ">=3.10,<3.13"
    • This matches the wheel build configuration in [tool.cibuildwheel]
    • PyPI will now correctly show "Requires: Python >=3.10, <3.13"
  2. CONTRIBUTING.md

    • Changed "Python ≥ 3.9" to "Python 3.10 - 3.12"
    • Prevents confusion for contributors about which Python versions to test against

Why <3.13?

The upper bound prevents installation attempts on Python 3.13+ where no wheels exist yet. This gives clearer error messages and prevents users from attempting installations that will fail.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Benefits

  • ✅ Clear, consistent Python version requirements across all documentation
  • ✅ Prevents confusing installation errors for Python 3.9 users
  • ✅ Better user experience with accurate version information on PyPI
  • ✅ Aligns with actual wheel availability
  • ✅ Matches the README documentation that users see first

Related Issues


Note: If Python 3.9 support is desired in the future, this would require either:

  1. Building cp39 wheels in the CI/CD pipeline, OR
  2. Publishing source distributions (sdist) to PyPI so users can compile from source

Change requires-python from '>=3.9' to '>=3.10,<3.13' to match the actual wheel availability (cp310, cp311, cp312) and the README documentation.
Change from 'Python >= 3.9' to 'Python 3.10 - 3.12' to match the actual wheel availability and package requirements.
Copilot AI review requested due to automatic review settings February 17, 2026 01:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns Python version requirements across documentation and configuration files to accurately reflect the actual supported versions. Previously, the documentation and configuration were inconsistent, with pyproject.toml declaring >=3.9 while only wheels for Python 3.10-3.12 were being built, causing confusing installation errors for Python 3.9 users.

Changes:

  • Updated pyproject.toml to specify requires-python = ">=3.10,<3.13" to match actual wheel availability
  • Updated CONTRIBUTING.md to reflect Python 3.10-3.12 support instead of Python ≥ 3.9
  • Fixed the git clone URL in CONTRIBUTING.md from a placeholder to the actual repository URL

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pyproject.toml Updated requires-python from >=3.9 to >=3.10,<3.13 to match cibuildwheel configuration
CONTRIBUTING.md Updated Python version prerequisite from ≥ 3.9 to 3.10 - 3.12 and fixed repository clone URL

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@feihongxu0824 feihongxu0824 requested a review from Cuiyus February 17, 2026 23:38
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