[New-bugs-announce] [issue28188] os.putenv should support bytes arguments on Windows

Eryk Sun report at bugs.python.org
Sat Sep 17 10:43:07 EDT 2016


New submission from Eryk Sun:

This suggestion may be controversial: os.putenv should decode bytes arguments as UTF-8, the new Windows filesystem encoding. Moreover, os.environb should also be implemented. This would be consistent with bytes support in os.spawnve and os.execve.

The controversial aspect, I think, is that this doesn't allow using arbitrary encodings for environment-variable names and values. The statement in the docs that os.environb allows one "to use a different encoding" than the filesystem encoding would have to be modified with a caveat that on wide-character platforms, such as Windows, using the filesystem encoding is mandatory.

----------
messages: 276797
nosy: eryksun
priority: normal
severity: normal
stage: needs patch
status: open
title: os.putenv should support bytes arguments on Windows
type: enhancement
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28188>
_______________________________________


More information about the New-bugs-announce mailing list