-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Set packages' minimum Python version to 3.9 per README #44386
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
base: main
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution @akx! We will review the pull request and get back to you soon. |
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.
Pull request overview
This PR updates the minimum supported Python version from 3.8 (and in some cases 3.7) to 3.9 across the Azure SDK for Python repository, aligning with PR #40587 which updated the README. The changes systematically update python_requires constraints and remove obsolete Python version classifiers from package metadata.
Key Changes
- Updated
python_requiresfrom>=3.7or>=3.8to>=3.9in approximately 300+ setup.py files - Removed Python 3.7 and 3.8 classifier entries from setup.py files
- Updated documentation files to reflect the new minimum version (README, tests.md, packaging.md, dev_setup.md, sphinx docs)
Reviewed changes
Copilot reviewed 210 out of 210 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/*/setup.py (300+ files) | Updated python_requires to >=3.9 and removed Python 3.7/3.8 classifiers |
| sdk/ml/azure-ai-ml/README.md | Updated tested Python versions list to start with 3.9 |
| sdk/ai/azure-ai-inference/README.md | Updated prerequisites to reference Python 3.9 |
| doc/sphinx/index.rst | Updated supported Python versions documentation |
| doc/dev/tests.md | Updated development environment setup instructions |
| doc/dev/packaging.md | Updated packaging guidelines and examples |
| doc/dev/dev_setup.md | Updated virtual environment creation examples |
Critical Issue: Many setup.py files contain conditional dependencies like typing-extensions>=4.3.0; python_version<'3.8.0' which are now obsolete since the minimum Python version is 3.9. These conditions will never evaluate to true and should be removed or updated. This affects approximately 100+ files across the repository.
| "typing-extensions>=4.3.0; python_version<'3.8.0'", | ||
| ], |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
| install_requires=[ | ||
| "isodate<1.0.0,>=0.6.1", | ||
| "azure-core<2.0.0,>=1.28.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is now obsolete since the minimum Python version is 3.9. This condition will never be true and should either be removed entirely or updated if typing-extensions is still needed.
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.
Yep, already have a commit that would do that – figured I'd do a follow-up PR for it for atomicity, but can add it here too.
| "isodate<1.0.0,>=0.6.1", | ||
| "azure-common~=1.1", | ||
| "azure-mgmt-core>=1.3.2,<2.0.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
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.
Yep: #44386 (comment)
| "typing-extensions>=4.3.0; python_version<'3.8.0'", | ||
| ], | ||
| python_requires=">=3.7" | ||
| python_requires=">=3.9" |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
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.
Yep: #44386 (comment)
| easier to debug PRs locally. | ||
|
|
||
| - Python 3.8+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store ([3.8](https://www.microsoft.com/p/python-38/9mssztt1n39l), [3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US)) (Windows only). | ||
| - Python 3.9+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store [3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US)) (Windows only). |
Copilot
AI
Dec 11, 2025
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.
The link reference to Python 3.8 in the Windows store should be removed since Python 3.8 is no longer supported. The link list should start with Python 3.9.
| - Python 3.9+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store [3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US)) (Windows only). | |
| - Python 3.9+: Use the [python website](https://www.python.org/downloads/) or the one-click experience from the Windows store [3.9](https://www.microsoft.com/p/python-39/9p7qfqmjrfp7), [3.10](https://www.microsoft.com/p/python-310/9pjpw5ldxlz5), [3.11](https://apps.microsoft.com/detail/9nrwmjp3717k?hl=en-us&gl=US), [3.12](https://apps.microsoft.com/detail/9ncvdn91xzqp?hl=en-us&gl=US) (Windows only). |
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.
Yes, indeed, that's... what this change does. Copilot, I think you were reading the diff wrong.
| "msrest>=0.7.1", | ||
| "azure-common~=1.1", | ||
| "azure-mgmt-core>=1.3.2,<2.0.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is now obsolete since the minimum Python version is 3.9. This condition will never be true and should either be removed entirely or updated to reflect the new minimum version constraint if typing-extensions is still needed for specific Python versions.
| "isodate<1.0.0,>=0.6.1", | ||
| "azure-common~=1.1", | ||
| "azure-mgmt-core>=1.3.2,<2.0.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
| "isodate<1.0.0,>=0.6.1", | ||
| "azure-common~=1.1", | ||
| "azure-mgmt-core>=1.3.2,<2.0.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
| "typing-extensions>=4.3.0; python_version<'3.8.0'", | ||
| ], |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
| "isodate<1.0.0,>=0.6.1", | ||
| "azure-common~=1.1", | ||
| "azure-mgmt-core>=1.3.2,<2.0.0", | ||
| "typing-extensions>=4.3.0; python_version<'3.8.0'", |
Copilot
AI
Dec 11, 2025
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.
The conditional dependency typing-extensions>=4.3.0; python_version<'3.8.0' is obsolete since the minimum Python version is now 3.9. This condition will never be true and should be removed or updated.
Description
#40587 updated the README for the repo to note that Python 3.9 is the minimum supported version.
This PR updates
setup.pyandpyproject.tomlfiles to reflect that too.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines