diff --git a/scripts/populate_tox/README.md b/scripts/populate_tox/README.md index b68e74bd26..32dc3c76cf 100644 --- a/scripts/populate_tox/README.md +++ b/scripts/populate_tox/README.md @@ -95,7 +95,7 @@ Python versions, you can say: ... } ``` - +This key is optional. ### `python` Sometimes, the whole test suite should only run on specific Python versions. @@ -110,8 +110,9 @@ For example, if you want AIOHTTP tests to only run on Python 3.7+, you can say: } ``` -Specifying `python` is discouraged as the script itself finds out which -Python versions are supported by the package. However, if a package has broken +The `python` key is optional, and when possible, it should be omitted. The script +should automatically detect which Python versions the package supports. +However, if a package has broken metadata or the SDK is explicitly not supporting some packages on specific Python versions (because of, for example, broken context vars), the `python` key can be used. diff --git a/scripts/populate_tox/populate_tox.py b/scripts/populate_tox/populate_tox.py index 59a4c5a0fe..ae4a260956 100644 --- a/scripts/populate_tox/populate_tox.py +++ b/scripts/populate_tox/populate_tox.py @@ -401,7 +401,7 @@ def write_tox_file(packages: dict) -> None: file.write("\n") -def _get_package_name(integration: str) -> Tuple[str, Optional[str]]: +def _get_package_name(integration: str) -> tuple[str, Optional[str]]: package = TEST_SUITE_CONFIG[integration]["package"] extra = None if "[" in package: