summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-04 12:16:35 (GMT)
committerGitHub <noreply@github.com>2017-11-04 12:16:35 (GMT)
commitd4d79bc1ff91b04625c312f0219c89aabcd19ce4 (patch)
treeba24dc24106347ce69d12d5e27532ccfb929e50e /Doc
parent82cd3cede804ca694fb0657fd985d5eff84a414f (diff)
downloadcpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.zip
cpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.tar.gz
cpython-d4d79bc1ff91b04625c312f0219c89aabcd19ce4.tar.bz2
bpo-28564: Use os.scandir() in shutil.rmtree(). (#4085)
This speeds up it to 20-40%.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.7.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index eb64c6a..d1792dc 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -440,6 +440,10 @@ Optimizations
using the :func:`os.scandir` function.
(Contributed by Serhiy Storchaka in :issue:`25996`.)
+* The :func:`shutil.rmtree` function has been sped up to 20--40%.
+ This was done using the :func:`os.scandir` function.
+ (Contributed by Serhiy Storchaka in :issue:`28564`.)
+
* Optimized case-insensitive matching and searching of :mod:`regular
expressions <re>`. Searching some patterns can now be up to 20 times faster.
(Contributed by Serhiy Storchaka in :issue:`30285`.)
@@ -656,6 +660,11 @@ Changes in the Python API
* ``repr`` for :class:`datetime.timedelta` has changed to include keyword arguments
in the output. (Contributed by Utkarsh Upadhyay in :issue:`30302`.)
+* Because :func:`shutil.rmtree` is now implemented using the :func:`os.scandir`
+ function, the user specified handler *onerror* is now called with the first
+ argument ``os.scandir`` instead of ``os.listdir`` when listing the direcory
+ is failed.
+
Changes in the C API
--------------------