[Python-checkins] bpo-34825: Add more entries to os to pathlib reference table (GH-9608) (#9717)

Andrew Svetlov webhook-mailer at python.org
Fri Oct 5 12:06:20 EDT 2018


https://github.com/python/cpython/commit/29c40c73143fee3612147959779b6927cd1be7e1
commit: 29c40c73143fee3612147959779b6927cd1be7e1
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Andrew Svetlov <andrew.svetlov at gmail.com>
date: 2018-10-05T19:06:17+03:00
summary:

bpo-34825: Add more entries to os to pathlib reference table (GH-9608) (#9717)

The added functions are as below :

| os module     | Pathlib       |
| ------------- | ------------- |
| os.chmod   | Path.chmod  |
| os.mkdir  | Path.mkdir  |
| os.rename | Path.rename |
| os.replace | Path.replace |
| os.rmdir  | Path.rmdir |
| os.remove, os.unlink | Path.unlink |
| os.path.samefile | Path.samefile |

Thanks

https://bugs.python.org/issue34825
(cherry picked from commit 6f9c55d1c0bb399911ded00bb6b3e6f43a514ea2)

Co-authored-by: Xtreak <tirkarthi at users.noreply.github.com>

files:
M Doc/library/pathlib.rst

diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index ec604f681593..b4ae293d14b8 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1085,23 +1085,30 @@ Below is a table mapping various :mod:`os` functions to their corresponding
    overlapping use-cases, their semantics differ enough to warrant not
    considering them equivalent.
 
-============================   ==============================
-os and os.path                 pathlib
-============================   ==============================
-:func:`os.path.abspath`        :meth:`Path.resolve`
-:func:`os.getcwd`              :func:`Path.cwd`
-:func:`os.path.exists`         :meth:`Path.exists`
-:func:`os.path.expanduser`     :meth:`Path.expanduser` and
-                               :meth:`Path.home`
-:func:`os.path.isdir`          :meth:`Path.is_dir`
-:func:`os.path.isfile`         :meth:`Path.is_file`
-:func:`os.path.islink`         :meth:`Path.is_symlink`
-:func:`os.stat`                :meth:`Path.stat`,
-                               :meth:`Path.owner`,
-                               :meth:`Path.group`
-:func:`os.path.isabs`          :meth:`PurePath.is_absolute`
-:func:`os.path.join`           :func:`PurePath.joinpath`
-:func:`os.path.basename`       :data:`PurePath.name`
-:func:`os.path.dirname`        :data:`PurePath.parent`
-:func:`os.path.splitext`       :data:`PurePath.suffix`
-============================   ==============================
+====================================   ==============================
+os and os.path                         pathlib
+====================================   ==============================
+:func:`os.path.abspath`                :meth:`Path.resolve`
+:func:`os.chmod`                       :meth:`Path.chmod`
+:func:`os.mkdir`                       :meth:`Path.mkdir`
+:func:`os.rename`                      :meth:`Path.rename`
+:func:`os.replace`                     :meth:`Path.replace`
+:func:`os.rmdir`                       :meth:`Path.rmdir`
+:func:`os.remove`, :func:`os.unlink`   :meth:`Path.unlink`
+:func:`os.getcwd`                      :func:`Path.cwd`
+:func:`os.path.exists`                 :meth:`Path.exists`
+:func:`os.path.expanduser`             :meth:`Path.expanduser` and
+                                       :meth:`Path.home`
+:func:`os.path.isdir`                  :meth:`Path.is_dir`
+:func:`os.path.isfile`                 :meth:`Path.is_file`
+:func:`os.path.islink`                 :meth:`Path.is_symlink`
+:func:`os.stat`                        :meth:`Path.stat`,
+                                       :meth:`Path.owner`,
+                                       :meth:`Path.group`
+:func:`os.path.isabs`                  :meth:`PurePath.is_absolute`
+:func:`os.path.join`                   :func:`PurePath.joinpath`
+:func:`os.path.basename`               :data:`PurePath.name`
+:func:`os.path.dirname`                :data:`PurePath.parent`
+:func:`os.path.samefile`               :meth:`Path.samefile`
+:func:`os.path.splitext`               :data:`PurePath.suffix`
+====================================   ==============================



More information about the Python-checkins mailing list