Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8ef864d5
Commit
8ef864d5
authored
Mar 12, 2019
by
Steve Dower
Committed by
GitHub
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36264: Updates documentation for change to expanduser on Windows (GH-12294)
parent
f45813df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
Doc/library/os.path.rst
Doc/library/os.path.rst
+7
-4
Doc/whatsnew/3.8.rst
Doc/whatsnew/3.8.rst
+8
-0
No files found.
Doc/library/os.path.rst
View file @
8ef864d5
...
@@ -172,10 +172,10 @@ the :mod:`glob` module.)
...
@@ -172,10 +172,10 @@ the :mod:`glob` module.)
password directory through the built-in module :mod:`pwd`. An initial ``~user``
password directory through the built-in module :mod:`pwd`. An initial ``~user``
is looked up directly in the password directory.
is looked up directly in the password directory.
On Windows, :envvar:`
HOME` and :envvar:`USERPROFILE` will be used if set,
On Windows, :envvar:`
USERPROFILE` will be used if set, otherwise a combination
o
therwise a combination of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be
o
f :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be used. An initial
used. An initial ``~user`` is handled by stripping the last directory component
``~user`` is handled by stripping the last directory component from the created
from the created
user path derived above.
user path derived above.
If the expansion fails or if the path does not begin with a tilde, the path is
If the expansion fails or if the path does not begin with a tilde, the path is
returned unchanged.
returned unchanged.
...
@@ -183,6 +183,9 @@ the :mod:`glob` module.)
...
@@ -183,6 +183,9 @@ the :mod:`glob` module.)
.. versionchanged:: 3.6
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
Accepts a :term:`path-like object`.
.. versionchanged:: 3.8
No longer uses :envvar:`HOME` on Windows.
.. index::
.. index::
single: $ (dollar); environment variables expansion
single: $ (dollar); environment variables expansion
single: % (percent); environment variables expansion (Windows)
single: % (percent); environment variables expansion (Windows)
...
...
Doc/whatsnew/3.8.rst
View file @
8ef864d5
...
@@ -236,6 +236,10 @@ now return ``False`` instead of raising :exc:`ValueError` or its subclasses
...
@@ -236,6 +236,10 @@ now return ``False`` instead of raising :exc:`ValueError` or its subclasses
characters or bytes unrepresentable at the OS level.
characters or bytes unrepresentable at the OS level.
(Contributed by Serhiy Storchaka in :issue:`33721`.)
(Contributed by Serhiy Storchaka in :issue:`33721`.)
:func:`~os.path.expanduser` on Windows now prefers the :envvar:`USERPROFILE`
environment variable and does not use :envvar:`HOME`, which is not normally set
for regular user accounts.
ncurses
ncurses
-------
-------
...
@@ -672,6 +676,10 @@ Changes in the Python API
...
@@ -672,6 +676,10 @@ Changes in the Python API
:exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) instead of :exc:`KeyError`.
:exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) instead of :exc:`KeyError`.
(Contributed by Xiang Zhang in :issue:`33106`.)
(Contributed by Xiang Zhang in :issue:`33106`.)
* :func:`~os.path.expanduser` on Windows now prefers the :envvar:`USERPROFILE`
environment variable and does not use :envvar:`HOME`, which is not normally
set for regular user accounts.
CPython bytecode changes
CPython bytecode changes
------------------------
------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment