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.

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
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 2022-04-11 14:57 by admin. This issue is now closed.

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.
Date User Action Args
2022-04-11 14:57:05adminsetgithub: 53814
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