Message326157
| Author |
ronaldoussoren |
| Recipients |
Anders.Hovmöller, gvanrossum, jaraco, ned.deily, ronaldoussoren, tdsmith, vinay.sajip |
| Date |
2018年09月23日.14:53:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1537714408.88.0.956365154283.issue22490@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|