diff --git a/src/python/pants/backend/python/lint/black/rules_integration_test.py b/src/python/pants/backend/python/lint/black/rules_integration_test.py index 9c2791b3c6e..cea9e0f4e5a 100644 --- a/src/python/pants/backend/python/lint/black/rules_integration_test.py +++ b/src/python/pants/backend/python/lint/black/rules_integration_test.py @@ -21,7 +21,6 @@ from pants.testutil.python_interpreter_selection import ( all_major_minor_python_versions, skip_unless_python38_present, - skip_unless_python39_present, ) from pants.testutil.python_rule_runner import PythonRuleRunner from pants.testutil.rule_runner import QueryRule @@ -236,27 +235,6 @@ class Foo: assert fmt_result.did_change is False -@skip_unless_python39_present -def test_works_with_python39(rule_runner: PythonRuleRunner) -> None: - """Black's typed-ast dependency does not understand Python 3.9, so we must instead run Black - with Python 3.9 when relevant.""" - content = dedent( - """\ - @lambda _: int - def replaced(x: bool) -> str: - return "42" if x is True else "1/137" - """ - ) - rule_runner.write_files( - {"f.py": content, "BUILD": "python_sources(name='t', interpreter_constraints=['>=3.9'])"} - ) - tgt = rule_runner.get_target(Address("", target_name="t", relative_file_path="f.py")) - fmt_result = run_black(rule_runner, [tgt], expected_ics=">=3.9") - assert "1 file left unchanged" in fmt_result.stderr - assert fmt_result.output == rule_runner.make_snapshot({"f.py": content}) - assert fmt_result.did_change is False - - def test_stub_files(rule_runner: PythonRuleRunner) -> None: rule_runner.write_files( { diff --git a/src/python/pants/backend/python/typecheck/mypy/rules_integration_test.py b/src/python/pants/backend/python/typecheck/mypy/rules_integration_test.py index 1869437ebd3..b65d985fffe 100644 --- a/src/python/pants/backend/python/typecheck/mypy/rules_integration_test.py +++ b/src/python/pants/backend/python/typecheck/mypy/rules_integration_test.py @@ -42,7 +42,6 @@ all_major_minor_python_versions, skip_unless_all_pythons_present, skip_unless_python38_present, - skip_unless_python39_present, ) from pants.testutil.python_rule_runner import PythonRuleRunner from pants.util.resources import read_sibling_resource @@ -357,26 +356,6 @@ def test_works_with_python38(rule_runner: PythonRuleRunner) -> None: assert_success(rule_runner, tgt, extra_args=extra_args) -@skip_unless_python39_present -def test_works_with_python39(rule_runner: PythonRuleRunner) -> None: - """MyPy's typed-ast dependency does not understand Python 3.9, so we must instead run MyPy with - Python 3.9 when relevant.""" - rule_runner.write_files( - { - f"{PACKAGE}/f.py": dedent( - """\ - @lambda _: int - def replaced(x: bool) -> str: - return "42" if x is True else "1/137" - """ - ), - f"{PACKAGE}/BUILD": "python_sources(interpreter_constraints=['>=3.9'])", - } - ) - tgt = rule_runner.get_target(Address(PACKAGE, relative_file_path="f.py")) - assert_success(rule_runner, tgt) - - def test_run_only_on_specified_files(rule_runner: PythonRuleRunner) -> None: rule_runner.write_files( { diff --git a/src/python/pants/base/specs_integration_test.py b/src/python/pants/base/specs_integration_test.py index 028924c1bbe..01907fb5e09 100644 --- a/src/python/pants/base/specs_integration_test.py +++ b/src/python/pants/base/specs_integration_test.py @@ -7,7 +7,7 @@ from textwrap import dedent from pants.testutil.pants_integration_test import PantsResult, run_pants, setup_tmpdir -from pants.testutil.python_interpreter_selection import skip_unless_python39_present +from pants.testutil.python_interpreter_selection import skip_unless_python310_present SOURCES = { # NB: This uses recursive globs for the `python_sources` and `python_tests` target generators, @@ -65,7 +65,7 @@ def run(args: list[str]) -> PantsResult: [ "--backend-packages=pants.backend.python", "--backend-packages=pants.backend.experimental.go", - "--python-interpreter-constraints=['==3.9.*']", + "--python-interpreter-constraints=['==3.10.*']", "--pants-ignore=__pycache__", *args, ] @@ -74,7 +74,7 @@ def run(args: list[str]) -> PantsResult: return result -@skip_unless_python39_present +@skip_unless_python310_present def test_address_literal() -> None: """Semantics: @@ -91,7 +91,7 @@ def test_address_literal() -> None: assert f"{tmpdir}/py:tests" not in test_result -@skip_unless_python39_present +@skip_unless_python310_present def test_sibling_addresses() -> None: """Semantics: @@ -127,7 +127,7 @@ def test_sibling_addresses() -> None: assert f"{tmpdir}/py:tests" not in test_result -@skip_unless_python39_present +@skip_unless_python310_present def test_descendent_addresses() -> None: """Semantics are the same as sibling addresses, only recursive.""" with setup_tmpdir(SOURCES) as tmpdir: @@ -148,7 +148,7 @@ def test_descendent_addresses() -> None: assert f"{tmpdir}/py:tests" not in test_result -@skip_unless_python39_present +@skip_unless_python310_present def test_file_arg() -> None: """Semantics: find the 'owning' target, using generated target rather than target generator when possible (regardless of project introspection vs. "build" goal).