[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2020-12-20 Thread miss-islington


miss-islington  added the comment:


New changeset 37a6d5f8027f969418fe53d0a73a21003a8e370d by Daniel Hahler in 
branch 'master':
[WIP/RFC] bpo-15872: tests: remove oddity from test_rmtree_errors (GH-22967)
https://github.com/python/cpython/commit/37a6d5f8027f969418fe53d0a73a21003a8e370d


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2020-10-25 Thread daniel hahler


Change by daniel hahler :


--
nosy: +blueyed
nosy_count: 11.0 -> 12.0
pull_requests: +21883
pull_request: https://github.com/python/cpython/pull/22967

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c9b9f786ec25 by Hynek Schlawack in branch '3.2':
#15872: Add tests for a 3.3 regression in the new fd-based shutil.rmtree
http://hg.python.org/cpython/rev/c9b9f786ec25

New changeset fc394216c724 by Hynek Schlawack in branch '3.3':
#15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
http://hg.python.org/cpython/rev/fc394216c724

New changeset c70d964b26fe by Hynek Schlawack in branch 'default':
#15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
http://hg.python.org/cpython/rev/c70d964b26fe

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5211391928bc by Hynek Schlawack in branch '3.2':
#15872: Fix shutil.rmtree error tests for Windows
http://hg.python.org/cpython/rev/5211391928bc

New changeset 4b2fca8ad07b by Hynek Schlawack in branch '3.3':
#15872: Fix shutil.rmtree error tests for Windows
http://hg.python.org/cpython/rev/4b2fca8ad07b

New changeset ae1ef62954f7 by Hynek Schlawack in branch 'default':
#15872: Fix shutil.rmtree error tests for Windows
http://hg.python.org/cpython/rev/ae1ef62954f7

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Hynek, for review and committing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Hynek, for review and committing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
Removed message: http://bugs.python.org/msg177269

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ce8f4a70ccd by Hynek Schlawack in branch '3.2':
#15872: More shutil test fixes for Windows
http://hg.python.org/cpython/rev/7ce8f4a70ccd

New changeset a05e2d4094ea by Hynek Schlawack in branch '3.3':
#15872: More shutil test fixes for Windows
http://hg.python.org/cpython/rev/a05e2d4094ea

New changeset c23659e2ec1a by Hynek Schlawack in branch 'default':
#15872: More shutil test fixes for Windows
http://hg.python.org/cpython/rev/c23659e2ec1a

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2d953d47d634 by Hynek Schlawack in branch '3.2':
#15872: Be flexible with appending *.* in shutil.rmtree test case
http://hg.python.org/cpython/rev/2d953d47d634

New changeset edb747c6c479 by Hynek Schlawack in branch '3.3':
#15872: Be flexible with appending *.* in shutil.rmtree test case
http://hg.python.org/cpython/rev/edb747c6c479

New changeset a0a25ffdec9d by Hynek Schlawack in branch 'default':
#15872: Be flexible with appending *.* in shutil.rmtree test case
http://hg.python.org/cpython/rev/a0a25ffdec9d

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Hynek Schlawack

Hynek Schlawack added the comment:

“I wish I were wrangling inconsistent Windows buildbots.”

Nobody. Ever. *sigh*

It appears they are appeased now, so finally closing. Thanks for the patches 
everyone!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-12-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb8274e1ebfa by Hynek Schlawack in branch '3.2':
#15872: Some more Windows related tuning to shutil.rmtree tests
http://hg.python.org/cpython/rev/cb8274e1ebfa

New changeset 561c4012929a by Hynek Schlawack in branch '3.3':
#15872: Some more Windows related tuning to shutil.rmtree tests
http://hg.python.org/cpython/rev/561c4012929a

New changeset 451559508c54 by Hynek Schlawack in branch 'default':
#15872: Some more Windows related tuning to shutil.rmtree tests
http://hg.python.org/cpython/rev/451559508c54

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated.  Added tests for onerror.

--
Added file: http://bugs.python.org/file27840/shutil_rmtree_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here are backported tests for 3.2 (they are passed).

--
Added file: http://bugs.python.org/file27841/shutil_rmtree_tests-3.2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests simplified.  Thanks Hynek for review and advices.

--
Added file: http://bugs.python.org/file27844/shutil_rmtree_4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file27845/shutil_rmtree_tests-3.2_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file27840/shutil_rmtree_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file27841/shutil_rmtree_tests-3.2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-11-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a new patch. It contains some other minor changes. rmtree behavior 
unified for system with and without at-functions.

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file27828/shutil_rmtree_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components: +Library (Lib)
nosy: +larry, serhiy.storchaka
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +3.3regression

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

+self.assertEqual(shutil.rmtree(os.path.join(tmpdir, tstfile), 
+   ignore_errors=True), None)

I wouldn't use assertEqual as the return value is not meaningful.

--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Éric Araujo

Éric Araujo added the comment:

NotADirectoryError not being caught makes sense to me: not passing a directory 
as argument to rmtree is a programmer error, not something coming from the OS 
or filesystem.

--
nosy: +eric.araujo, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

To be honest I don't really understand the point of the ignore_errors flag on 
rmtree. If rmtree fails to delete the directory tree (which will happen if one 
of the files can't be deleted), why would you want it to return succesfully?

--
nosy: +hynek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now shutil.rmtree has different behavior when called for non-directory on 
systems with and without at-functions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 If rmtree fails to delete the directory tree (which will happen if one of the 
 files can't be deleted), why would you want it to return succesfully?

At least it free some disk space. ;-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Hynek Schlawack

Hynek Schlawack added the comment:

 To be honest I don't really understand the point of the ignore_errors flag on 
 rmtree. If rmtree fails to delete the directory tree (which will happen if 
 one of the files can't be deleted), why would you want it to return 
 succesfully?

I presume it’s meant as a best-effort cleanup.

Regardless both Eric  Serhiy are right: it’s a programmer error to call it on 
files and it may shadow bugs catching it. OTOH the implementation is 
inconsistent and not backward compatible now, so we have to fix it 
unfortunately.

The patch needs to address Giampaolo’s (bug tracker)  Serhiy’s (Rietveld) 
comments before it can be merged though – thanks. :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-19 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Jakub Wilk

New submission from Jakub Wilk:

This used to work correctly in Python 3.2:

Python 3.3.0rc1 (default, Aug 29 2012, 00:39:20) 
[GCC 4.7.1] on linux
Type help, copyright, credits or license for more information.
 import shutil
 shutil.rmtree('/etc/fstab', ignore_errors=True)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.3/shutil.py, line 456, in rmtree
Not a directory: '{}'.format(path))
NotADirectoryError: [Errno 20] Not a directory: '/etc/fstab'

--
messages: 169936
nosy: jwilk
priority: normal
severity: normal
status: open
title: shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Alessandro Moura

Alessandro Moura added the comment:

Yes, confirmed. When checking whether the provided path is a directory, rmtree 
does not check whether ignore_errors is set. According to the docstring, If 
ignore_errors is set, errors are ignored. Presumably this means any error, in 
which case this is not the desired behaviour.

The attached patch fixes this.

--
keywords: +patch
nosy: +eng793
Added file: http://bugs.python.org/file27138/shutil.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Can you also provide a test?

--
nosy: +cjerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-09-06 Thread Alessandro Moura

Alessandro Moura added the comment:

Added test to patch.

--
Added file: http://bugs.python.org/file27139/shutil.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com