<@U04S45AHA> thoughts on us changing the default f...
# development
h
@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
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
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
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
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
So, for example, you'd want all AWS lambdas to be unzip since - IIUC - they are deployed + run once exactly.
👍 1
w
if we were to begin sharing state for the
venv
mode, would it become a sensible default?
e
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.