Skip to content

Conversation

@akx
Copy link
Contributor

@akx akx commented Dec 11, 2025

Description

#40587 updated the README for the repo to note that Python 3.9 is the minimum supported version.

This PR updates setup.py and pyproject.toml files to reflect that too.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
    • It certainly shouldn't – but with this, Python package installers will likely refuse to install these packages on Python 3.8 (which is really a good thing).
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
    • This has already been announced previously, just not correctly enforced.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
    • No code was changed.

@github-actions
Copy link

Thank you for your contribution @akx! We will review the pull request and get back to you soon.

Copy link
Contributor

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 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_requires from >=3.7 or >=3.8 to >=3.9 in 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.

Comment on lines 66 to 67
"typing-extensions>=4.3.0; python_version<'3.8.0'",
],
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 76 to +78
"typing-extensions>=4.3.0; python_version<'3.8.0'",
],
python_requires=">=3.7"
python_requires=">=3.9"
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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).
Copy link

Copilot AI Dec 11, 2025

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.

Suggested change
- 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).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
"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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
"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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines 66 to 67
"typing-extensions>=4.3.0; python_version<'3.8.0'",
],
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
"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'",
Copy link

Copilot AI Dec 11, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant