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

pantsbuild / pants / 28053454659
93%
main: 93%

Build:
Build:
LAST BUILD BRANCH: fix_uv_sources_config
DEFAULT BRANCH: main
Ran 23 Jun 2026 08:10PM UTC
Jobs 11
Files 1739
Run time 8min
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

23 Jun 2026 08:03PM UTC coverage: 92.901% (+0.006%) from 92.895%
28053454659

push

github

web-flow
Fix derived interpreter constraints for spec target when using `[python].default_resolve_to_interpreter_constraints` (Cherry-pick of #23419) (#23430)

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.

## Additional

Any chance I can have this cherry-picked into a patch version?

Co-authored-by: Nick Dell'Osa <nicholas.dellosa@joinhandshake.com>

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

92345 of 99402 relevant lines covered (92.9%)

3.72 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 28053454659.1 23 Jun 2026 08:29PM UTC 1227
59.43
GitHub Action Run
2 test_python_linux_x86_64_5/10 - 28053454659.2 23 Jun 2026 08:20PM UTC 1207
59.67
GitHub Action Run
3 test_python_linux_x86_64_2/10 - 28053454659.3 23 Jun 2026 08:20PM UTC 1195
58.6
GitHub Action Run
4 test_python_linux_x86_64_7/10 - 28053454659.4 23 Jun 2026 08:28PM UTC 1198
51.3
GitHub Action Run
5 test_python_linux_arm64 - 28053454659.5 23 Jun 2026 08:10PM UTC 1176
52.29
GitHub Action Run
6 test_python_linux_x86_64_8/10 - 28053454659.6 23 Jun 2026 08:23PM UTC 1195
53.56
GitHub Action Run
7 test_python_linux_x86_64_6/10 - 28053454659.7 23 Jun 2026 08:20PM UTC 1188
49.52
GitHub Action Run
8 test_python_linux_x86_64_3/10 - 28053454659.8 23 Jun 2026 08:24PM UTC 1193
54.09
GitHub Action Run
9 test_python_linux_x86_64_9/10 - 28053454659.9 23 Jun 2026 08:18PM UTC 1203
54.08
GitHub Action Run
10 test_python_linux_x86_64_0/10 - 28053454659.10 23 Jun 2026 08:25PM UTC 1212
56.7
GitHub Action Run
11 test_python_linux_x86_64_1/10 - 28053454659.11 23 Jun 2026 08:22PM UTC 1191
49.16
GitHub Action Run
Source Files on build 28053454659
  • Tree
  • List 1739
  • Changed 8
  • Source Changed 2
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28053454659
  • 0535db06 on github
  • Prev Build on 2.32.x (#27455945338)
  • Next Build on 2.32.x (#28214746973)
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