]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-76912: Raise OSError from any failure in getpass.getuser() (#29739)
authorJacob Walls <jacobtylerwalls@gmail.com>
Mon, 27 Nov 2023 18:05:55 +0000 (13:05 -0500)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2023 18:05:55 +0000 (10:05 -0800)
commit99a73c3465a45fe57cac01a917fc50e0743b5964
treebe3c8979398f0e81a6e9d5bccb7b3d715f1cb418
parent936c503a442ee062c837e334f237796554c792ff
gh-76912: Raise OSError from any failure in getpass.getuser() (#29739)

* bpo-32731: Raise OSError from any failure in getpass.getuser()
Previously, if the username was not set in certain environment variables, ImportError escaped on Windows systems, and it was possible for KeyError to escape on other systems if getpwuid() failed.
Doc/library/getpass.rst
Doc/whatsnew/3.13.rst
Lib/getpass.py
Lib/test/test_getpass.py
Misc/NEWS.d/next/Library/2021-11-23-22-22-49.bpo-32731.kNOASr.rst [new file with mode: 0644]