[issue24229] pathlib.Path should have a copy() method

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue24229] pathlib.Path should have a copy() method

2015-05-19 Thread Josh Holland

Josh Holland added the comment:

Serhiy makes a series of good points, which I hadn't really considered before 
filing this report. It was mostly laziness on my part while dashing off a quick 
script - I knew I wouldn't have to deal with the edge cases so subconsciously 
dismissed them, especially as the code I wrote to copy was only a couple of 
lines.

So I'm happy for this bug to be closed with no change needed.

--

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



[issue24229] pathlib.Path should have a copy() method

2015-05-18 Thread Josh Holland

New submission from Josh Holland:

Path objects already have rename() and replace() methods; it would be useful 
for them also to have a copy() method to simplify that operation.

I'll look into putting a patch together this evening.

--
components: Library (Lib)
messages: 243494
nosy: jshholland
priority: normal
severity: normal
status: open
title: pathlib.Path should have a copy() method
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

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



[issue24229] pathlib.Path should have a copy() method

2015-05-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Path objects are immutable, so the copy method is not needed.

--
nosy: +pitrou, serhiy.storchaka

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



[issue24229] pathlib.Path should have a copy() method

2015-05-18 Thread Paul Moore

Paul Moore added the comment:

I presume the copy method is intended as a file copy, not for copying the 
object. But calling the method copy() is likely to be confusing, precisely as 
happened here :-)

--
nosy: +paul.moore

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



[issue24229] pathlib.Path should have a copy() method

2015-05-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If copy() has a mandatory argument, it can't really be mixed up with an 
object-cloning method.

--

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



[issue24229] pathlib.Path should have a copy() method

2015-05-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

File renaming is simple and usually atomic operation. File copying is complex 
operation. What memory buffer should be used for copying? What to do with 
growing files or reading with errors? Should file space be preallocated before 
copyiong to decrease fragmentation? How handle sparse files? Can be optimized 
copyiong on file systems with compression? What to do with NT streams? What to 
do with extended attributes? What to do with directories, links and other 
special files?

I think that pathlib is not good place for this function (as well as for 
handling ZIP files or playing multimedia).

--

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