diff options
| author | Jack DeVries <jdevries3133@gmail.com> | 2022-04-16 04:23:07 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-16 04:23:07 (GMT) |
| commit | 468314cc8bfdb6fd328cbbbb7d0807728f25e043 (patch) | |
| tree | df8060feb336364a088afebc75deab7f7c43037d | |
| parent | a8617566759a07c67d14c9b6ed663e32d3b3f5e7 (diff) | |
| download | cpython-468314cc8bfdb6fd328cbbbb7d0807728f25e043.zip cpython-468314cc8bfdb6fd328cbbbb7d0807728f25e043.tar.gz cpython-468314cc8bfdb6fd328cbbbb7d0807728f25e043.tar.bz2 | |
gh-82849: revise intro to os.path.rst (GH-32232)
* revise the first paragraph of docs for os.path
* add a mention of `os.PathLike` protocol
* remove warnings rendered irrelevant by :pep:`383` and :pep:`529`
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
| -rw-r--r-- | Doc/library/os.path.rst | 15 | ||||
| -rw-r--r-- | Misc/NEWS.d/next/Documentation/2022-04-01-09-28-31.bpo-38668.j4mrqW.rst | 3 |
2 files changed, 7 insertions, 11 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index 6b15a11..c201b14 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -11,16 +11,10 @@ -------------- -This module implements some useful functions on pathnames. To read or -write files see :func:`open`, and for accessing the filesystem see the -:mod:`os` module. The path parameters can be passed as either strings, -or bytes. Applications are encouraged to represent file names as -(Unicode) character strings. Unfortunately, some file names may not be -representable as strings on Unix, so applications that need to support -arbitrary file names on Unix should use bytes objects to represent -path names. Vice versa, using bytes objects cannot represent all file -names on Windows (in the standard ``mbcs`` encoding), hence Windows -applications should use string objects to access all files. +This module implements some useful functions on pathnames. To read or write +files see :func:`open`, and for accessing the filesystem see the :mod:`os` +module. The path parameters can be passed as strings, or bytes, or any object +implementing the :class:`os.PathLike` protocol. Unlike a unix shell, Python does not do any *automatic* path expansions. Functions such as :func:`expanduser` and :func:`expandvars` can be invoked @@ -38,7 +32,6 @@ the :mod:`glob` module.) their parameters. The result is an object of the same type, if a path or file name is returned. - .. note:: Since different operating systems have different path name conventions, there diff --git a/Misc/NEWS.d/next/Documentation/2022-04-01-09-28-31.bpo-38668.j4mrqW.rst b/Misc/NEWS.d/next/Documentation/2022-04-01-09-28-31.bpo-38668.j4mrqW.rst new file mode 100644 index 0000000..512f0de --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-04-01-09-28-31.bpo-38668.j4mrqW.rst @@ -0,0 +1,3 @@ +Update the introduction to documentation for :mod:`os.path` to remove +warnings that became irrelevant after the implementations of :pep:`383` and +:pep:`529`. |
