bpo-35652 Add use_srcentry parameter to shutil.copytree() II · Pull Request #11425 · python/cpython (original) (raw)
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.
Fixes the behaviour which was introduced in #7874 (bpo-33695).
Successor of #11421. I hope everything is okay now.