https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

04/09/2021, 1:23 AM
@enough-analyst-54434 thoughts on us changing the default for
pex_binary
to
venv
, rather than
zipapp
? Fwict, it has far fewer gotchas and much better perf for most use cases. It will require a deprecation cycle to change the default. I can do that if you agree
e

enough-analyst-54434

04/09/2021, 1:45 AM
It probably makes sense. For ML shops it could be bad. Neither venvs or unzips currently share any state like zipapp mode does; so if you deploy alot of apps to a host that share many big dists, those big dists will be duplicated.
👍 1
It probably should just be a required field to force careful consideration.
h

hundreds-father-404

04/09/2021, 1:50 AM
I think I'm in favor of that, especially if we can augment the (already great) help message to mention why you might want zipapp Maybe also more thoughts on unzip vs. venv, I'm not sure why you you would ever choose unzip
e

enough-analyst-54434

04/09/2021, 1:51 AM
Unzip has a the fastest cold start of the three. Venv has the fastest warm start. Zipapp uses the least space on the host.
h

hundreds-father-404

04/09/2021, 1:53 AM
Great, thanks! I can submit a patch once the unzip deprecation PR lands Generally, we try for "sensible defaults", but I do agree that none of them is particularly sensible here as we can't assume what you value most
e

enough-analyst-54434

04/09/2021, 1:53 AM
So, for example, you'd want all AWS lambdas to be unzip since - IIUC - they are deployed + run once exactly.
👍 1
w

witty-crayon-22786

04/12/2021, 4:34 PM
if we were to begin sharing state for the
venv
mode, would it become a sensible default?
e

enough-analyst-54434

04/12/2021, 5:33 PM
Maybe. We could default awslambda to unzip.
That would boil down to whether symlinks for both modules and packages work / are recognized by python. Not sure on that.