Maybe bug in tests re: Local dists. Can I get anot...
# development
b
Maybe bug in tests re: Local dists. Can I get another set of 👀 in 🧵 ?
In
src/python/pants/backend/python/util_rules/local_dists_test.py
we make a
LocalDistsPexRequest
with no ICs associated, but the test assumes py3. Seems like we'd want to get the ICs from the sources here?
Yeah OK I think it's a bug. Every "real world" caller provides ICs
w
probably a bug. but it seems like beyond ICs, any caller setting
internal_only
(aka: please build this for exactly one interpreter, because this is not being published outside of Pants) could provide an actual interpreter
Copy code
def __init__(
  self,
  addresses: Iterable[Address],
  *,
  interpreters: InterpreterConstraints | PythonBinary,
  sources: PythonSourceFiles = PythonSourceFiles.empty(),
) -> None:
when tests are running, iirc, they’ve already chosen an interpreter. so passing in
internal_only=True, interpreter_constraints=…
would be asking to re-resolve, and then relying on the same one that was pre-resolved to be re-resolved.
yea, it looks like the
internal_only
flag already does some of this… it’s not clear though that when you pass it, you don’t need to pass ICs