On 9/28/2021 9:10 AM, Antoine Pitrou wrote:
To me, the point would be to get the same behavior no matter which python executable I run, and without regard to where I run it from.On 2021年9月28日 08:55:05 -0400 "Eric V. Smith" <[email protected]> wrote:So I prefer to teach everybody how to use "-X frozen_modules=off" if they want to hack the stdlib for their greatest pleasure. I prefer that such special use case requires an opt-in option, the special use case is not special enough to be the default.I agree with Victor here: I'd rather have #1.As a compromise, how about go with #1, but print a warning if python detects that it's not built with optimizations or is run from a source tree (the conditions in #2 and #3)? The warning could suggest running with "-X frozen_modules=off". I realize that it will probably be ignored over time, but maybe it will provide enough of a reminder if someone is debugging and sees the warning.What would be the point of printing a warning instead of doing just what the user is expecting?
Eric
Freezing the stdlib is a startup performance optimization. It doesn't need to be turned on when hacking on the Python source code... And having to type "-X frozen_modules=off" is much more of a nuisance than losing 10 ms in startup time (which you won't even notice in most cases). Regards Antoine. _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/IJEP37TCGR4SVRPGAHIILA42BSUKZZ2O/ Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/CEKYHC2Z66DAASLQEHCT4PEQ35LWUE7K/ Code of Conduct: http://python.org/psf/codeofconduct/