STINNER Victor <vstin...@python.org> added the comment:
POSIX says: (1) "The setenv() function shall fail if: [EINVAL] The name argument is a null pointer, points to an empty string, or points to a string containing an '=' character." https://pubs.opengroup.org/onlinepubs/009604499/functions/setenv.html (2) "The unsetenv() function shall fail if: [EINVAL] The name argument is a null pointer, points to an empty string, or points to a string containing an '=' character." https://pubs.opengroup.org/onlinepubs/009695399/functions/unsetenv.html But POSIX doesn't specify which keys are invalid for putenv. It only specifies a single error: (3) "The putenv() function may fail if: [ENOMEM] Insufficient memory was available." https://pubs.opengroup.org/onlinepubs/009696899/functions/putenv.html The GNU libc respects POSIX. IMO setenv() and unsetenv() are fine. The problem comes from putenv() which is under specified and allows keys which are causing a lot of subtle issues, not only in Python. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20658> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com