Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
adad9e68
Commit
adad9e68
authored
Jan 25, 2019
by
Steve Dower
Committed by
GitHub
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35811: Avoid propagating venv settings when launching via py.exe (GH-11677)
parent
4e02f8f8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
Misc/NEWS.d/next/Windows/2019-01-25-12-46-36.bpo-35811.2hU-mm.rst
...S.d/next/Windows/2019-01-25-12-46-36.bpo-35811.2hU-mm.rst
+1
-0
PC/launcher.c
PC/launcher.c
+11
-0
No files found.
Misc/NEWS.d/next/Windows/2019-01-25-12-46-36.bpo-35811.2hU-mm.rst
0 → 100644
View file @
adad9e68
Avoid propagating venv settings when launching via py.exe
PC/launcher.c
View file @
adad9e68
...
...
@@ -1707,6 +1707,17 @@ process(int argc, wchar_t ** argv)
command
=
skip_me
(
GetCommandLineW
());
debug
(
L"Called with command line: %ls
\n
"
,
command
);
#if !defined(VENV_REDIRECT)
/* bpo-35811: The __PYVENV_LAUNCHER__ variable is used to
* override sys.executable and locate the original prefix path.
* However, if it is silently inherited by a non-venv Python
* process, that process will believe it is running in the venv
* still. This is the only place where *we* can clear it (that is,
* when py.exe is being used to launch Python), so we do.
*/
SetEnvironmentVariableW
(
L"__PYVENV_LAUNCHER__"
,
NULL
);
#endif
#if defined(SCRIPT_WRAPPER)
/* The launcher is being used in "script wrapper" mode.
* There should therefore be a Python script named <exename>-script.py in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment