<#23103 Invalid interpreter_constraints for pex_bi...
# github-notifications
q
#23103 Invalid interpreter_constraints for pex_binary Issue created by kaos Describe the bug Subset calculation seems to be broken. Pants version 2.32.0.dev1 (but seems to apply the same to older versions as well, so not a new regression, it would seem) OS MacOS (likely irrelevant) Additional info Repro, in
txtar
format. ( https://deepwiki.com/rogpeppe/go-internal/3.2-txtar-tools )
Copy code
-- BUILD --
python_sources(name="sources")
pex_binary(
    name="pex",
    entry_point="main.py:main",
    interpreter_constraints=[">=3.13", "<3.14"],
)
-- main.py --

def main():
    print("Main here")

-- pants.toml --
[GLOBAL]
pants_version = "2.32.0.dev1"

backend_packages = [
  "pants.backend.python",
]

[python]
interpreter_constraints = [">=3.13,<3.14"]
Running
pants package ::
I get:
Copy code
12:00:58.03 [ERROR] 1 Exception encountered:

Engine traceback:
  in `package` goal

InvalidFieldException: The target //:pex has the `interpreter_constraints` ('>=3.13', '<3.14'), which are not a subset of the `interpreter_constraints` of some of its dependencies:

  * ('>=3.13,<3.14',): //main.py:sources

To fix this, you should likely adjust //:pex's `interpreter_constraints` to match the narrowest range in the above list.
This, to me, seems kind of silly, as they're an exact match. pantsbuild/pants