Issue 9283: buggy repr for os.environ (original) (raw)

Issue9283

Created on 2010-07-17 11:07 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os_environ_repr.patch vstinner,2010-07-24 01:34
Messages (4)
msg110547 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-07-17 11:07
os.environ has the same repr as os.environb, that is, it looks as though it's a mapping of bytes to bytes, while it's a mapping of str to str. >>> repr(os.environ)[:50] "environ({b'TMP': b'/tmp/', b'XAUTHORITY': b'/var/r" >>> repr(os.environb)[:50] "environ({b'TMP': b'/tmp/', b'XAUTHORITY': b'/var/r"
msg110560 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-17 14:31
Ezio, it looks like your test for issue 7310 uses exactly the same algorithm as the code itself does, and thus did not detect this breakage.
msg111408 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-07-24 01:34
Patch to fix _Environ.__repr__(), regression introduced by #8603.
msg111849 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-07-28 21:26
Fixed in 3.2 (r83214 + r83215). Other versions are not concerned.
History
Date User Action Args
2022-04-11 14:57:03 admin set github: 53529
2010-07-28 21:26:08 vstinner set status: open -> closedresolution: fixedmessages: +
2010-07-24 01:34:39 vstinner set files: + os_environ_repr.patchkeywords: + patchmessages: +
2010-07-17 14:31:57 r.david.murray set nosy: + ezio.melotti, r.david.murraymessages: +
2010-07-17 11:07:38 pitrou create