<#19496 Premature interpreter resolution with diff...
# github-notifications
c
#19496 Premature interpreter resolution with different interpreter constraints Issue created by lecardozo Describe the bug We have recently introduced different python constraints in our monorepo (Python 3.8 for some modules, Python 3.10 for others) and are now adapting our CI/CD to this new requirement. After some initial setup, we caught a weird behavior while running the following command:
Copy code
./pants --changed-since=origin/main
        --changed-dependees=transitive
        --filter-address-regex="folder/with/only/python310/code/*"
        --filter-target-type=pex_binary 
      package
Assuming that all changed code (and their dependents) also live within the
folder/with/only/python310/code
folder, I would expect this to work on an environment with Python 3.10 only. However, the behavior we see right now is that, even though the code that requires a different python version (3.8.*) has not changed and is also under a different folder, we still receive the No interpreter compatible error 👇
Copy code
Examined the following interpreters:
1.) /usr/local/bin/python3.10 CPython==3.10.12
2.)        /usr/bin/python3.9 CPython==3.9.2

No interpreter compatible with the requested constraints was found:

  Version matches CPython==3.8.*
It’s important to notice that we don’t have
python_sources
or
pex_binaries
that depend on any of the sources that require the 3.8.* interpreter. Pants version 2.16.0 OS Currently on MacOS, but probably can be reproduced on Linux as well Additional info • Slack thread where discussion started • Repro: we created this repository in order to reproduce the bug pantsbuild/pants