New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add use_srcentry parameter to shutil.copytree() #79829
Comments
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 parameter, added the use_srcentry parameter. |
A new PR is started. |
You are right about the bug. The funny thing is, I never saw it. The problem I see is another. |
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 of that (only passes DirEntry instances around if copy_function is not specified by user). |
Okay, than this behaviour is wanted. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: