[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-02-24 Thread flokX
flokX added the comment: Okay, than this behaviour is wanted. I only thought that the user should have more control about it, but you are right, only the path string is better to handle. I will close the PR. -- pull_requests: +12051 resolution: -> not a bug status: open -> closed __

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-02-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: When user uses copy_function argument, the callback function should always receive path strings, both for consistency and for not breaking backward compatibility. This line: use_srcentry = copy_function is copy2 or copy_function is copy ...makes sure

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-02-23 Thread flokX
flokX added the comment: You are right about the bug. The funny thing is, I never saw it. The problem I see is another. The use_srcentry variable in the _copytree function is set by determining if the copy_function is the function copy2 or copy. If so the srcentry is passed to the copy_funct

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-02-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It turns out that's a bug I introduced in PR-7874. I'm providing: https://github.com/python/cpython/pull/11997 ...which fixes it without introducing a new parameter. I also verified that monkey patching shutil.copy2 and shutil.copy doesn't cause any issue.

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-02-23 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- assignee: docs@python -> resolution: later -> status: closed -> open ___ Python tracker ___ ___ P

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
flokX added the comment: A new PR is started. See https://bugs.python.org/issue35652 and https://github.com/python/cpython/pull/11425 -- nosy: -docs@python resolution: -> later stage: patch review -> resolved status: open -> closed ___ Python tra

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
Change by flokX : -- keywords: +patch, patch, patch, patch pull_requests: +10832, 10833, 10834, 10835 stage: -> patch review ___ Python tracker ___ ___

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
Change by flokX : -- keywords: +patch, patch pull_requests: +10832, 10833 stage: -> patch review ___ Python tracker ___ ___ Python-

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
Change by flokX : -- keywords: +patch pull_requests: +10832 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
Change by flokX : -- keywords: +patch, patch, patch pull_requests: +10832, 10833, 10835 stage: -> patch review ___ Python tracker ___ _

[issue35648] Add use_srcentry parameter to shutil.copytree()

2019-01-03 Thread flokX
New submission from flokX : Currently it is decided if to use the srcentry in the copy_function by checking if the copy_function is copy() or copy2(). This will fail if the copy_function is a modified copy() or copy2() function. To control if the copy_function gets a srcentry or srcname param