Skip to content

Conversation

@jaraco
Copy link
Member

@jaraco jaraco commented Mar 22, 2020

  • bpo-22490: Remove "PYVENV_LAUNCHER" from the shell environment on macOS

This changeset removes the environment varialbe "PYVENV_LAUNCHER"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.

Leaving the environment variable present may lead to misbehaviour when
launching other scripts.

  • Actually commit the changes for issue 22490...

  • Correct typo

Co-Authored-By: Nicola Soranzo [email protected]

  • Run make patchcheck

Co-authored-by: Jason R. Coombs [email protected]
Co-authored-by: Nicola Soranzo [email protected].
(cherry picked from commit 044cf94)

Co-authored-by: Ronald Oussoren [email protected]

https://bugs.python.org/issue22490

…aunch (GH-9516)

* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS

This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.

Leaving the environment variable present may lead to misbehaviour when
launching other scripts.

* Actually commit the changes for issue 22490...

* Correct typo

Co-Authored-By: Nicola Soranzo <[email protected]>

* Run make patchcheck

Co-authored-by: Jason R. Coombs <[email protected]>
Co-authored-by: Nicola Soranzo <[email protected]>.
(cherry picked from commit 044cf94)

Co-authored-by: Ronald Oussoren <[email protected]>
@telamonian
Copy link

Thanks for backporting this!

I stumbled accross this issue when I found yet another weird bug caused by __PYVENV_LAUNCHER__, which broke IPython kernels launched from a Jupyter server running in a venv. Because __PYVENV_LAUNCHER__ was polluting the environment when the Python process in the kernel started, include-system-site-packages = false could get picked up from the venv's pyvenv.cfg, which meant that the site-packages dir would get left off of sys.path for that kernel's Python instance.

For reference, which Python version did this first get included in? For me, upgrading from 3.7.6 -> 3.7.9 fixed the above issue.

@jaraco
Copy link
Member Author

jaraco commented Oct 13, 2020

Looks like it was added in 3.7.8rc1

@telamonian
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants