summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2020-01-28 09:41:50 (GMT)
committerSteve Dower <steve.dower@python.org>2020-01-28 09:41:50 (GMT)
commitc45a2aa9e255b5c7c211faa79f6b23895b64ab27 (patch)
tree05b12f49c1133fc3713d23eb51eb5ed770b9424f /Misc
parent61f4db8c56ca4b7e60050d96ecc255cfb03d92a0 (diff)
downloadcpython-c45a2aa9e255b5c7c211faa79f6b23895b64ab27.zip
cpython-c45a2aa9e255b5c7c211faa79f6b23895b64ab27.tar.gz
cpython-c45a2aa9e255b5c7c211faa79f6b23895b64ab27.tar.bz2
bpo-38883: Don't use POSIX `$HOME` in `pathlib.Path.home/expanduser` on Windows (GH-17961)
In bpo-36264 os.path.expanduser was changed to ignore HOME on Windows. Path.expanduser/home still honored HOME despite being documented as behaving the same as os.path.expanduser. This makes them also ignore HOME so that both implementations behave the same way again.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst b/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst
new file mode 100644
index 0000000..c552e85
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2020-01-11-22-53-55.bpo-38883.X7FRaN.rst
@@ -0,0 +1,5 @@
+:meth:`~pathlib.Path.home()` and :meth:`~pathlib.Path.expanduser()` on Windows
+now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`, which is not
+normally set for regular user accounts. This makes them again behave like
+:func:`os.path.expanduser`, which was changed to ignore :envvar:`HOME` in 3.8,
+see :issue:`36264`.