Title: deprecate shutil.copy2
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.3
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: datamuc, eric.araujo, giampaolo.rodola, rhettinger, vstinner
Priority: normal Keywords: patch

Created on 2011-05-03 21:17 by datamuc, last changed 2018-06-12 10:23 by giampaolo.rodola.

File name Uploaded Description Edit datamuc, 2011-05-03 21:17 deprecate shutil.copy2 review
Messages (4)
msg135073 - (view) Author: Danijel (datamuc) Date: 2011-05-03 21:17
The function name is really ugly. The attached patch introduces an optional parameter to shutil.copy.
msg135326 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-06 16:56
Thanks for the report.  Could you elaborate a bit on the rational for the change?  Aesthetics are usually not sufficient to change things; on the other hand, use of simplicity is a goal.

Is is easier to remember two functions for two uses or to have one function with a parameter?  Are users confused by the two functions with unhelpful names?  These are the kinds of questions to answer before considering breaking everyone’s code with a deprecation and removal.

Would you be willing to raise the issue on the python-ideas mailing list to get feedback?  Thanks in advance.
msg290580 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-27 10:49
I like proposed changed.
msg319375 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2018-06-12 10:23
If such a thing goes in then copytree() should also be taken into account and expose the same parameter. That would probably be inconsistent with copytree()'s copy_function parameter though.
Date User Action Args
2018-06-12 10:23:36giampaolo.rodolasetnosy: + giampaolo.rodola
messages: + msg319375
2017-03-27 10:49:19vstinnersetstatus: pending -> open
nosy: + vstinner
messages: + msg290580

2017-03-26 10:37:20serhiy.storchakasetstatus: open -> pending
2011-05-06 16:56:56eric.araujosetnosy: + rhettinger, eric.araujo

messages: + msg135326
versions: + Python 3.3, - Python 3.4
2011-05-03 21:17:59datamuccreate