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

pantsbuild / pants / 27584169499 / 2
93%
main: 93%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 12:29AM UTC
Files 1239
Run time 48s
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: 58.983%. Remained the same
27584169499.2

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.

38272 of 64887 relevant lines covered (58.98%)

0.59 hits per line

Source Files on job test_python_linux_x86_64_4/10 - 27584169499.2
  • Tree
  • List 1239
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 27584169499
  • 15ae0239 on github
  • Prev Job for on main (#27417451381.6)
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