Message360803
> I honestly would have disagreed with the Popen change for its 'env'
> argument or any other place that is dealing with environment
> variables
os.spawnve (Windows) and os.execve support __fspath__ for the env dict partially due to me (bpo-28114), so sorry if that was the wrong decision. However, at least on the POSIX side, I was restoring previous behavior that aligned with POSIX os.putenv. An example of what's supported currently:
Windows:
>>> path = os.environ['comspec']
>>> argv = ['cmd', '/c', 'echo %SPAM%']
>>> env = os.environ.copy()
>>> env[Path('SPAM')] = Path('eggs')
>>> os.spawnve(0, path, argv, env)
eggs
0
POSIX:
>>> path = '/bin/bash'
>>> argv = ['bash', '-c', 'echo $SPAM']
>>> env = os.environ.copy()
>>> env[Path('SPAM')] = Path('eggs')
>>> os.spawnve(0, path, argv, env)
eggs
0 |
|
Date |
User |
Action |
Args |
2020-01-27 21:22:53 | eryksun | set | recipients:
+ eryksun, brett.cannon, vstinner, ethan.furman, serhiy.storchaka, Antony.Lee |
2020-01-27 21:22:53 | eryksun | set | messageid: <1580160173.28.0.468669244541.issue39461@roundup.psfhosted.org> |
2020-01-27 21:22:53 | eryksun | link | issue39461 messages |
2020-01-27 21:22:52 | eryksun | create | |
|