Skip to content

Commit

Permalink
truth in advertising for all major Python versions (#21714)
Browse files Browse the repository at this point in the history
This updates to in-code list to match what is currently available in CI.

See #21606 for further background, context, and why there are more
snakes on the CI plane.
  • Loading branch information
cburroughs authored Dec 16, 2024
1 parent 475fed5 commit fddc1d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pants.backend.python import target_types_rules
from pants.backend.python.lint.docformatter.rules import DocformatterFieldSet, DocformatterRequest
from pants.backend.python.lint.docformatter.rules import rules as docformatter_rules
from pants.backend.python.lint.docformatter.subsystem import Docformatter
from pants.backend.python.lint.docformatter.subsystem import rules as docformatter_subsystem_rules
from pants.backend.python.target_types import PythonSourcesGeneratorTarget
from pants.core.goals.fmt import FmtResult
Expand Down Expand Up @@ -71,7 +70,10 @@ def run_docformatter(
@pytest.mark.platform_specific_behavior
@pytest.mark.parametrize(
"major_minor_interpreter",
all_major_minor_python_versions(Docformatter.default_interpreter_constraints),
# Excluded due to https://github.com/pantsbuild/pants/issues/21718
# lib2to3 is Officially Removed in 3.13, but some distributions of Python
# remove it earlier See for example https://github.com/PyCQA/docformatter/issues/129
all_major_minor_python_versions(["CPython>=3.8,<3.12"]),
)
def test_passing(rule_runner: RuleRunner, major_minor_interpreter: str) -> None:
rule_runner.write_files({"f.py": GOOD_FILE, "BUILD": "python_sources(name='t')"})
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/testutil/python_interpreter_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def all_major_minor_python_versions(
"""
versions = InterpreterConstraints(constraints).partition_into_major_minor_versions(
# Please update this when new stable Python versions are released to CI.
interpreter_universe=["2.7", "3.6", "3.7", "3.8", "3.9"]
interpreter_universe=["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
)
return tuple(
pytest.param(
Expand Down

0 comments on commit fddc1d3

Please sign in to comment.