|
29 | 29 |
|
30 | 30 |
|
31 | 31 | # Configuration |
32 | | -PYTHON_TAGS = ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314", "cp315"] |
| 32 | +PYTHON_TAGS: list[str] = ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314", "cp315"] |
33 | 33 | WIN_ARM64_PYTHON_TAGS = ["cp311", "cp312", "cp313", "cp314"] |
34 | 34 |
|
35 | 35 | BASE_PLATFORMS = [ |
|
44 | 44 | ] |
45 | 45 | SERVERLESS_PLATFORMS = [p for p in BASE_PLATFORMS if "linux" in p] |
46 | 46 |
|
47 | | -# cp315 is best-effort: no cp315 wheel is required, and a cp315 Linux wheel is |
48 | | -# tolerated when one does land. The macOS and Windows matrices stop at 3.14, and |
49 | | -# every cp315 leg of "build linux" is allow_failure in package.yml, so requiring a |
50 | | -# cp315 wheel here would turn a build that the pipeline is explicitly allowed to |
51 | | -# lose into a hard failure of "ddtrace package" -- which has no allow_failure and |
52 | | -# gates the release stage. 4.14.0 shipped cp315 musllinux but no cp315 manylinux, |
53 | | -# and would have been blocked by such a requirement. |
54 | | -# TODO(py-315): keep this in lockstep with the cp315 allow_failure rule in |
55 | | -# package.yml. Populating it while that rule stands re-creates the hard failure |
56 | | -# above; dropping the rule without populating it leaves cp315 unvalidated. #17816 |
57 | | -# owns the flip and must do both at once. |
| 47 | +# cp315 is optional: none required; tolerate Linux wheels if they land. |
58 | 48 | REQUIRED_PLATFORMS: dict[str, list[str]] = {"cp315": []} |
59 | | -OPTIONAL_WHEELS = {("cp315", p) for p in BASE_PLATFORMS if "linux" in p} |
| 49 | +OPTIONAL_WHEELS: set[tuple[str, str]] = {("cp315", p) for p in BASE_PLATFORMS if "linux" in p} |
60 | 50 |
|
61 | 51 |
|
62 | 52 | def required_platforms(py_tag: str, platforms: list[str]) -> list[str]: |
63 | 53 | """Restrict platforms for Python versions that are not built everywhere.""" |
64 | | - allowed = REQUIRED_PLATFORMS.get(py_tag) |
| 54 | + allowed: list[str] | None = REQUIRED_PLATFORMS.get(py_tag) |
65 | 55 | if allowed is None: |
66 | 56 | return platforms |
67 | 57 | return [p for p in platforms if p in allowed] |
@@ -238,7 +228,7 @@ def main(args: argparse.Namespace) -> None: |
238 | 228 | # Phase 4: Build Expected Set |
239 | 229 | print("[Phase 4] Building Expected Set") |
240 | 230 | expected_set = build_expected_set(package_version, args) |
241 | | - unrestricted_tags = [t for t in PYTHON_TAGS if t not in REQUIRED_PLATFORMS] |
| 231 | + unrestricted_tags: list[str] = [t for t in PYTHON_TAGS if t not in REQUIRED_PLATFORMS] |
242 | 232 | print(f"Expected {len(expected_set)} wheels:") |
243 | 233 | print( |
244 | 234 | f" - {len(unrestricted_tags)} Python versions ({unrestricted_tags[0]}-{unrestricted_tags[-1]})" |
@@ -274,7 +264,7 @@ def main(args: argparse.Namespace) -> None: |
274 | 264 | # Unexpected wheels |
275 | 265 | unexpected_wheels = actual_set - expected_set |
276 | 266 | # Filter out version mismatches (they're already reported) |
277 | | - unexpected_non_version = [ |
| 267 | + unexpected_non_version: list[tuple[str, str, str, str]] = [ |
278 | 268 | (v, p, pl, fl) |
279 | 269 | for v, p, pl, fl in unexpected_wheels |
280 | 270 | if reconstruct_wheel_filename(v, p, pl, fl) not in version_mismatches and (p, pl) not in OPTIONAL_WHEELS |
|
0 commit comments