diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2019-10-29 21:15:18 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-10-30 13:13:15 +0100 |
| commit | 6315a272c5cfcc70b745f87b25148a158663a222 (patch) | |
| tree | cb910d6184f19527ab66823dd3a0ab9b89ffc010 /docs/ref | |
| parent | 4c762588ff6748a9a9bad111894fd418c43b74a9 (diff) | |
Refs #28428 -- Made filepath_to_uri() support pathlib.Path.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/utils.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 4f174c5efe..09b174c1ce 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -280,7 +280,8 @@ The functions defined in this module share the following properties: .. function:: filepath_to_uri(path) Convert a file system path to a URI portion that is suitable for inclusion - in a URL. The path is assumed to be either UTF-8 bytes or string. + in a URL. The path is assumed to be either UTF-8 bytes, string, or a + :class:`~pathlib.Path`. This method will encode certain characters that would normally be recognized as special characters for URIs. Note that this method does not @@ -289,6 +290,10 @@ The functions defined in this module share the following properties: Returns an ASCII string containing the encoded result. + .. versionchanged:: 3.1 + + Support for :class:`pathlib.Path` ``path`` was added. + .. function:: escape_uri_path(path) Escapes the unsafe characters from the path portion of a Uniform Resource |
