File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1077,6 +1077,9 @@ are always available. They are listed here in alphabetical order.
10771077 .. versionchanged :: 3.5
10781078 The ``'namereplace' `` error handler was added.
10791079
1080+ .. versionchanged :: 3.6
1081+ Support added to accept objects implementing :class: `os.PathLike `.
1082+
10801083.. function :: ord(c)
10811084
10821085 Given a string representing one Unicode character, return an integer
Original file line number Diff line number Diff line change @@ -175,6 +175,9 @@ process and user.
175175
176176 .. versionadded :: 3.2
177177
178+ .. versionchanged :: 3.6
179+ Support added to accept objects implementing :class: `os.PathLike `.
180+
178181
179182.. function :: fsdecode(filename)
180183
@@ -185,6 +188,9 @@ process and user.
185188
186189 .. versionadded :: 3.2
187190
191+ .. versionchanged :: 3.6
192+ Support added to accept objects implementing :class: `os.PathLike `.
193+
188194
189195.. function :: fspath(path)
190196
@@ -195,6 +201,21 @@ process and user.
195201 (which is represented by :class: `os.PathLike `). All other types raise a
196202 :exc: `TypeError `.
197203
204+ .. versionadded :: 3.6
205+
206+
207+ .. class :: PathLike
208+
209+ An :term: `abstract base class ` for objects representing a file system path,
210+ e.g. :class: `pathlib.PurePath `.
211+
212+ .. abstractmethod :: __fspath__()
213+
214+ Return the file system path representation of the object.
215+
216+ The method should only return a :class: `str ` or :class: `bytes ` object,
217+ with the preference being for :class: `str `.
218+
198219
199220.. function :: getenv(key, default=None)
200221
You can’t perform that action at this time.
0 commit comments