summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-05 15:49:35 (GMT)
committerGitHub <noreply@github.com>2018-12-05 15:49:35 (GMT)
commitf2f4555d8287ad217a1dba7bbd93103ad4daf3a8 (patch)
treed3c3dfaee0aa56df5cdf4d9d60db7b65c3e33db4 /Misc
parent398bd27967690f2c1a8cbf8d47a5613edd9cfb2a (diff)
downloadcpython-f2f4555d8287ad217a1dba7bbd93103ad4daf3a8.zip
cpython-f2f4555d8287ad217a1dba7bbd93103ad4daf3a8.tar.gz
cpython-f2f4555d8287ad217a1dba7bbd93103ad4daf3a8.tar.bz2
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
* posixpath.expanduser() now returns the input path unchanged if the HOME environment variable is not set and pwd.getpwuid() raises KeyError (the current user identifier doesn't exist in the password database). * Add test_no_home_directory() to test_site.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-12-05-13-37-39.bpo-10496.VH-1Lp.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-12-05-13-37-39.bpo-10496.VH-1Lp.rst b/Misc/NEWS.d/next/Library/2018-12-05-13-37-39.bpo-10496.VH-1Lp.rst
new file mode 100644
index 0000000..232fcc6
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-12-05-13-37-39.bpo-10496.VH-1Lp.rst
@@ -0,0 +1,5 @@
+:func:`posixpath.expanduser` now returns the input *path* unchanged if the
+``HOME`` environment variable is not set and the current user has no home
+directory (if the current user identifier doesn't exist in the password
+database). This change fix the :mod:`site` module if the current user doesn't
+exist in the password database (if the user has no home directory).