On Tue, 28 Sept 2021 at 15:33, Eric Snow <ericsnowcurrently@gmail.com> wrote:
It means that the site module module can no longer be "customized" by modifying directly the site.py file (inject a path in PYTHONPATH env var where the customized site.py lives). But there is already a supported way to customize the site module: create a module named "sitecustomize" or "usercustomizer". I recall that virtualenv likes to override stdlib site.py with its own code. tox uses virtualenv by default. Someone should check if freezing site doesn't break virtualenv and tox, since they seem to be popular in Python. The venv doesn't need to override site.py and tox can use venv if I recall correctly.
If site.py customization is too popular, I would suggest to not freeze this one, until the community stops doing that.
Good point. I'll look into that.
I don't believe virtualenv ships its own site.py these days. That was a historical thing, and was always a pain point, but when virtualenv got rewritten I'm almost certain we stopped doing it. Paul