This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Antony.Lee, brett.cannon, eryksun, ethan.furman, serhiy.storchaka, vstinner
Date 2020-01-27.21:22:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580160173.28.0.468669244541.issue39461@roundup.psfhosted.org>
In-reply-to
Content
> 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
History
Date User Action Args
2020-01-27 21:22:53eryksunsetrecipients: + eryksun, brett.cannon, vstinner, ethan.furman, serhiy.storchaka, Antony.Lee
2020-01-27 21:22:53eryksunsetmessageid: <1580160173.28.0.468669244541.issue39461@roundup.psfhosted.org>
2020-01-27 21:22:53eryksunlinkissue39461 messages
2020-01-27 21:22:52eryksuncreate