classification
Title: os.getlogin() should use PEP 383 decoding to match the pwd module
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: baikie, vstinner
Priority: normal Keywords: patch

Created on 2010-08-14 19:13 by baikie, last changed 2010-08-15 09:35 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
getlogin-pep383.diff baikie, 2010-08-14 19:13 Use PyUnicode_DecodeFSDefault() in getlogin()
Messages (2)
msg113922 - (view) Author: David Watson (baikie) Date: 2010-08-14 19:13
The pwd module decodes usernames with PyUnicode_DecodeFSDefault(), and the LOGNAME environment variable (suggested as an alternative to getlogin()) is decoded the same way.  Attaching a patch to use PyUnicode_DecodeFSDefault() in getlogin().
msg113948 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-08-15 09:35
Commited to 3.1 as r84064 and to 3.2 as r84063. Thanks David.
History
Date User Action Args
2010-08-15 09:35:17vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg113948
2010-08-14 21:53:06pitrousetnosy: + vstinner
2010-08-14 19:13:53baikiecreate