[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-04 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset 44467e8ea4cea390b0718702291b4cfe8ddd67ed by Steve Dower in branch 
'3.7':
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
https://github.com/python/cpython/commit/44467e8ea4cea390b0718702291b4cfe8ddd67ed


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +11692

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset a8474d025cab794257d2fd0bea67840779b9351f by Steve Dower in branch 
'master':
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
https://github.com/python/cpython/commit/a8474d025cab794257d2fd0bea67840779b9351f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-02 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch, patch
pull_requests: +11670, 11671
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-02 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +11670
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-02 Thread Steve Dower


Steve Dower  added the comment:

So with the fix for multiprocessing, we currently rely on __PYVENV_LAUNCHER__ 
remaining set throughout the process.

However, it may be better to add a "sys.base_executable" property instead and 
clear the __PYVENV_LAUNCHER__ variable once we've read it. Then we can set it 
again in multiprocessing and launch the base executable, and otherwise default 
to launching the redirector.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-01 Thread Marc Schlaich


New submission from Marc Schlaich :

Controlling a venv from the python.exe from another venv does not work since 
3.7.2 on Windows. This is probably related to the change

bpo-34977: venv on Windows will now use a python.exe redirector rather than 
copying the actual binaries from the base environment.

This is obviously related to bpo-35872, but this could be a different bug.

When a Python script in a venv wants to control another venv by running 
commands like `another-venv\python.exe -m pip` with subprocess, python.exe is 
not referencing the other venv. It is referencing to the venv the script 
currently running from. This is probably because os.environ contains a 
'__PYVENV_LAUNCHER__' which is pointing to the venv from the script.

This can be reproduced with pipx (https://github.com/pipxproject/pipx-app) by 
running

pipx install --python "C:\Program Files (x86)\Python37-32\python.exe" 
--verbose tox

This results in pip installing to venvs\pipx-app and not in venvs\tox. 


I assume a simpler reproduction might be (but I cannot check this anymore as 
I'm back on 3.7.1 right now):

C:\Program Files (x86)\Python37-32\python.exe -m venv 
C:\Users\$USER\.local\pipx\venvs\tox
c:\users\$USER\.local\pipx\venvs\pipx-app\scripts\python.exe -c "import 
subprocess; 
subprocess.run(['C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe', 
'-m', 'pip', 'install', 'tox'])"


Downstream bugreport in pipx is 
https://github.com/pipxproject/pipx-app/issues/81.

--
components: Library (Lib), Windows
messages: 334659
nosy: paul.moore, schlamar, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Controlling venv from venv no longer works in 3.7.2
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com