When I run `./pants repl` against a python library...
# general
j
When I run
./pants repl
against a python library target which has
compatibility="CPython>=3.6.8,<4",
I get a py3 repl. When I run it againt a library that does not have any
compatibility
defined, I get a py2 repl. This is with
pants.ini
having a config
interpreter_constraints: ["CPython>=2.7.15,<3","CPython>=3.6.8,<4"]
When I run
./pants repl 3rdparty/python3:Flask
I get a repl dependent on what is in
.pants.d
. If I delete
.pants.d
and run with an ini file that has ``interpreter_constraints: ["CPython>=2.7.15,<3","CPython>=3.6.8,<4"]` I get a py2 repl. If I edit
pants.ini
to have
interpreter_constraints: ["CPython>=3.6.8,<4"]
I still get a py2 repl. If I delete
.pants.d
I then get a py3 repl.
Setting
interpreter_constraints: ["CPython>=2.7.15,<3","CPython>=3.6.8,<4"]
, I still get py3 repo when I run
./pants repl 3rdparty/python3:Flask
even though I had previously got a py2 repl.
Should I be able to update
interpreter_constraints
without having to change the
pants_workdir?
Ok. I was able to solve it by using the patter we had before. I made a wrapper script (
pant3
) that sets
PANTS_WORKDIR
to a different directory then the one in
pants.ini
.
👀 1
Since this solves my current problem, I am going to refocus on getting to v1.30.0. At which point I will spend more time on this issue. 😵
h
Should I be able to update
interpreter_constraints
without having to change the
pants_workdir?
Yes, you certainly should be able to. This is buggy behavior. That workaround is not at all satisfying, but it sounds like it’ll work for y’all for now? Trying to get to 1.30 sounds great. This type of thing shouldn’t be an issue with the V2 engine, and generally the Python support is much better