• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 27584169499
93%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 12:02AM UTC
Jobs 11
Files 1757
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2026 11:52PM UTC coverage: 92.795% (+0.005%) from 92.79%
27584169499

push

github

web-flow
Fix derived interpreter constraints for root target (#23419)

Fixes #23418.

  ## Problem

When `[python].default_to_resolve_interpreter_constraints` is enabled,
`validate_python_dependencies` should derive a target's default
interpreter constraints from its configured Python resolve when the
  target does not set `interpreter_constraints` directly.

The dependency side already did this correctly by reading
`PythonResolveField` directly from each dependency target. The root
target being validated did not: `DependencyValidationFieldSet` declared
`resolve` as `PythonResolveField | None`, and `FieldSet.create()` only
populates attributes whose annotation is a direct `Field` subclass.
Because the union annotation was ignored, the field set kept the
dataclass default of `None`, causing the root target to fall back to
global Python interpreter constraints instead of the resolve-derived
constraints.

That made validation asymmetric: the root target used global interpreter
constraints, while dependencies used resolve-derived interpreter
constraints.

  ## Solution

Change `DependencyValidationFieldSet.resolve` to be a direct
`PythonResolveField` annotation so `FieldSet.create()` includes it.
`PythonResolveField` remains optional for dependency validation because
it
is not part of `required_fields`; this preserves the existing FieldSet
optional-field pattern while allowing resolve-capable Python targets to
carry their actual resolve into validation.

The tests now cover manual interpreter constraint validation, explicit
target interpreter constraints overriding resolve defaults, and the
resolve-derived default case that reproduces the issue.

36 of 36 new or added lines in 2 files covered. (100.0%)

93175 of 100410 relevant lines covered (92.79%)

3.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_9/10 - 27584169499.1 16 Jun 2026 12:03AM UTC 1216
53.57
GitHub Action Run
2 test_python_linux_x86_64_4/10 - 27584169499.2 16 Jun 2026 12:08AM UTC 1239
58.98
GitHub Action Run
3 test_python_linux_x86_64_0/10 - 27584169499.3 16 Jun 2026 12:06AM UTC 1224
56.13
GitHub Action Run
4 test_python_linux_x86_64_2/10 - 27584169499.4 16 Jun 2026 12:02AM UTC 1209
58.51
GitHub Action Run
5 test_python_linux_x86_64_6/10 - 27584169499.5 16 Jun 2026 12:02AM UTC 1200
49.43
GitHub Action Run
6 test_python_linux_x86_64_1/10 - 27584169499.6 16 Jun 2026 12:05AM UTC 1204
49.18
GitHub Action Run
7 test_python_linux_x86_64_8/10 - 27584169499.7 16 Jun 2026 12:05AM UTC 1207
52.94
GitHub Action Run
8 test_python_linux_x86_64_3/10 - 27584169499.8 16 Jun 2026 12:04AM UTC 1206
53.65
GitHub Action Run
9 test_python_linux_arm64 - 27584169499.9 16 Jun 2026 12:03AM UTC 1188
51.93
GitHub Action Run
10 test_python_linux_x86_64_5/10 - 27584169499.10 16 Jun 2026 12:02AM UTC 1220
59.12
GitHub Action Run
11 test_python_linux_x86_64_7/10 - 27584169499.11 16 Jun 2026 12:09AM UTC 1210
50.96
GitHub Action Run
Source Files on build 27584169499
  • Tree
  • List 1757
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27584169499
  • 15ae0239 on github
  • Prev Build on main (#27417451381)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc