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

chore: bump minimum supported Python version to 3.11 #10386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Nov 6, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

Description

  • drop the support for Python 3.10, support and tested with Python 3.11 and 3.12
  • rerunning dev/reformat
    • to fix UP042 linter rule violations, auto fixed by with --unsafe-fixes
    • other linter auto fixes
  • updated poetry lockfile, stripping dependency details for Python 3.10

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

@bowenliang123 bowenliang123 marked this pull request as ready for review November 6, 2024 16:03
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Nov 6, 2024
@laipz8200 laipz8200 self-requested a review November 7, 2024 06:03
Copy link
Collaborator

@laipz8200 laipz8200 left a comment

Choose a reason for hiding this comment

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

Thank you for doing this great work.

IMO, the updates for GitHub Actions, documentation, and code should be separated into three PRs. Would you mind making this change?

There’s no need to rush, as we still need to test the new Python version.

api/README.md Outdated Show resolved Hide resolved
@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Nov 7, 2024

Thanks for the review. Python 3.11 brings performance improvements and many helpful features and typings.

As for your suggestion of separated PR, it seems that we still have to put them in one.
Once we raise the required minimum version in pyproject.toml project specification, it will immediately fail on Python 3.10 including:

  • failed to install Python dependency via Poetry with Python version checks
  • failed to pass Poetry's lockfile checks
  • failed to pass Ruff linter checks, as Ruff runs the checking on different baseline on based minimum Python versions, especially for the UP pyupgrade rules

@cuckootan
Copy link
Contributor

I think it's better to keep support python3.10, due to the great cost of upgrading docker image(and other parts).

@laipz8200
Copy link
Collaborator

@cuckootan We have to do this upgrade cause many new libraries require the new Python version. You can start preparing to do this upgrade from now on.

@bowenliang123 bowenliang123 marked this pull request as draft November 24, 2024 01:37
@bowenliang123 bowenliang123 marked this pull request as ready for review November 24, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants