Ronald Oussoren <ronaldousso...@mac.com> added the comment:
I've added PR 9516 that just clears __PYVENV_LAUNCHER__ from the environment as soon as it is no longer needed. A more involved change would be to change both the interpreter and the stub executable to avoid the need to use an environment variable in the first place: - Add and "-X" flag to the interpreter to pass the information that's currently passed using an environment variable - Change pythonw.c to add this new option to the argv vector. This would be slightly cleaner, at the cost of having more complicated code (and is a change that would IMHO not qualify for a back port, while my current PR is minimal enough for a back port) Note that both with and without this PR sys.executable points to the python executable inside the venv (when using a env). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue22490> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com