[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto  added the comment:

Well, I happy to improve patch. 

But, on Linux and Windows, shutil.move() does not raise any exception if source 
and destination are identical. If we change the behavior, I'm afraid we would 
break a lot of existing applications.

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Well, then fix is for shutil.move() too please, otherwise we can’t close
this ticket which is a pity after over 6 years. :)

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto  added the comment:

So, the title of this issue is misleading.

The patch originally proposed by Zooko does not raise SameFileError in
shutil.move(). If source and destination is same file, shutil.move() may
raise exception, but the exception is NOT SameFileError but OSError or 
something.

shutil.copy() raises SameFileError if source and destination is same file.

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

If nobody else, I’ll review it tomorrow at the latest.

On a first glance I realized our shutil Exceptions are all derived from 
EnvironmentError which is just a compatibility alias for OSError since 3.3.

Quick poll before I open a dedicated ticket, change that for 3.4?

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto  added the comment:

Behavior is not changed at all.

I fixed test_shutil.py to test if SameFileError is raised in
shutil.copy() instead of shutil.move().

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks.  Can you clarify what behavior changed compared to the previous patch?  
From the doc it looks like shutil.move now always raises SameFileError, whereas 
the previous patch said that on Unix it depended on the semantics of os.rename.

The patch has some very minor issues like extraneous whitespace in the docs, 
but they can be fixed by the person committing.

--
assignee: eric.araujo -> 
keywords: +needs review
stage: test needed -> patch review
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +hynek

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto  added the comment:

Cleaned up the patch.

Gennadiy added a test of shutil.move(), but SameFileError 
will be raised only if shutil.copy() was called. 

Am I missing something?

--
nosy: +ishimoto
Added file: http://bugs.python.org/file26394/issue1492704_new.patch

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Gennadiy Zlobin

Gennadiy Zlobin  added the comment:

Yes, I got Windows 7, downloaded VS 2008 express, compiled, ran
python python_d.exe -m test test_shutil 
and tests failed. I found out that os.rename does not raise OSError, according 
to my previous comment...

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Éric Araujo

Éric Araujo  added the comment:

By testing, I mean running ./python -m test test_shutil

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-09-08 Thread Gennadiy Zlobin

Gennadiy Zlobin  added the comment:

My fault. I tested it only partially, relying on the documentation that says

"""
On Windows, if dst already exists, OSError will be raised even if it is a file
"""
Actually it does not (at least at my Windows 7):
(Pdb) os.path.isfile(src)
True
(Pdb) p os.rename(src, src)
None

Am I doing something wrong?

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-09-07 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks, looks good.  There are a few minor cosmetic things I’ll change before 
committing.  I assume you have tested it on Windows?

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-09-07 Thread Gennadiy Zlobin

Gennadiy Zlobin  added the comment:

Thanks for the comments! Here'a a new patch.

--
Added file: http://bugs.python.org/file23115/new_patch.diff

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-08-19 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the patch.  I made a review on Rietveld; a mail should have been 
sent.

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-08-10 Thread Gennadiy Zlobin

Gennadiy Zlobin  added the comment:

This patch should fix the issue

--
nosy: +gennad
Added file: http://bugs.python.org/file22874/1492704.diff

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

I have re-read PEP 3151 and think it has no bearing on this bug: the PEP is 
about adding exception classes that map to errno values, and this report is 
about a library function that returns a custom exception unrelated to errnos.

I’m willing to review a patch with tests and docs updates for this, or write 
one myself.

--
assignee: tarek -> eric.araujo
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2010-08-22 Thread Éric Araujo

Éric Araujo  added the comment:

Antoine, is this obsoleted by PEP 3151?

--
nosy: +pitrou

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2010-08-22 Thread Mark Lawrence

Mark Lawrence  added the comment:

@Zooko are you interested in taking this forward?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2010-06-12 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee: anthonybaxter -> tarek
nosy: +merwok, tarek
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2009-04-22 Thread Daniel Diniz

Changes by Daniel Diniz :


--
keywords: +easy

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2009-03-20 Thread Daniel Diniz

Changes by Daniel Diniz :


--
stage:  -> test needed
type:  -> feature request
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

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