On Wed, Apr 27, 2022 at 5:56 PM Antoine Pitrou <anto...@python.org> wrote: > An environment variable is an easy to influence a program or system > whose inner workings you don't control (for example a system that > spawns child Python processes). And it sounds like a good idea to allow > that given that it improves security?
Ok, you changed my mind and I added PYTHONDONTADDPATH0=1 env var. Example: $ ./python -c 'import sys, pprint; pprint.pprint(sys.path)' ['', '/usr/local/lib/python311.zip', '/home/vstinner/python/main/Lib', '/home/vstinner/python/main/build/lib.linux-x86_64-3.11-pydebug', '/home/vstinner/.local/lib/python3.11/site-packages'] $ PYTHONDONTADDPATH0=1 ./python -c 'import sys, pprint; pprint.pprint(sys.path)' ['/usr/local/lib/python311.zip', '/home/vstinner/python/main/Lib', '/home/vstinner/python/main/build/lib.linux-x86_64-3.11-pydebug', '/home/vstinner/.local/lib/python3.11/site-packages'] Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/JQHOHQ5VSY3AZBQQXO655YE2YB4AJQV2/ Code of Conduct: http://python.org/psf/codeofconduct/