<@UB2J9BQA0> another question, `pants_version = "1...
# general
c
@hundreds-father-404 another question,
pants_version = "1.27.0.dev1"
default
zip_safe
to
true
for python_binary? (Used to be
false
for earlier version). Is it configurable for a given target? Or a global overwrite in
pants.toml
?
h
Hm, are you using V1 or V2 binary? In V1, it’s defaulted to
True
since 2014. You override it in your BUILD file by setting
zip_safe=False
for the
python_binary
target. But V2 does not yet respect the field if you have it in a BUILD file, which is only due to us not implementing it yet. If you’re trying to use V2 binary, we can gladly add that mechanism!
c
v2
👍 1
h
Okay, good to know. We can make sure that a fix for is included in 1.27.0.dev2, along with respecting the other fields like
emit_warnings
and
shebang
.
c
Yes, I am in the process of trying out V2 for varies of our use cases: repl, pyprep, binary, run, test for Python and some Golang/Node support, etc.
💯 1
Thanks
h
Awesome, please continue to let us know any additional issues you run into like this and we would be happy to prioritize addressing them! This is really helpful to us 🙂 Unfortunately, Go/Node aren’t in scope for 1.27.0, but check out #v2node if you aren’t a member yet for some initial work on adding V2 Node support!
a
is there somewhere i can read up on the V2 changes for python? a little scared about being caught off guard by sudden changes and regressions in functionality upon upgrading
h
Good question. We’re aiming for close to 1-1 parity. For example, with the issue Zhanwu identified, V2 Python binary will support all the same
python_binary
fields, we simply haven’t finished implementing it yet. Things that we won’t be porting to V2 have been going through the deprecation policy at https://www.pantsbuild.org/deprecation_policy.html (tl;dr: the deprecated thing must go through a complete release cycle before being removed so that you never have something removed on you without seeing a deprecation the release before). We’ve been trying to identify things that we can have users start adapting to now to make the migration path to V2 very painless and something that only brings upside. For example, we deprecated
./pants --test-pytest-fast
, because that option and behavior doesn’t make sense in V2.
h
@astonishing-jelly-60479 We are working on a new docsite for v2 python (https://pants.readme.io/ - still a WIP, but some useful stuff there already), and an accompanying example repo (https://github.com/pantsbuild/example-python/)
a
perfect, thanks
h
It doesn't really address changes vs. v1 though
Not explicitly anyway
c
Good to know that I am not alone And now I am more encouraged to ask those newbie questions 😉
❤️ 1
h
@calm-artist-46894 this is now implemented 🙂 https://github.com/pantsbuild/pants/pull/9449 I’ll be putting out a dev release tomorrow, which will include this change.
Hey @calm-artist-46894 fyi the new release 1.27.0.dev2 went out on Friday and adds support for all the
python_binary
fields like
zip_safe
🙂
c
Thanks, will try it out today
💯 1