Bug 1889790

Summary: ignore_dangling_symlinks in shutil.copytree does not work
Product: [Fedora] Fedora Reporter: Petr Šplíchal <psplicha>
Component: python3.9Assignee: Python Maintainers <python-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: cstratak, dmalcolm, lbalhar, m.cyprian, mhroncok, pviktori, python-sig, rkuska, shcherbina.iryna, slavek.kabrda, thrnciar, tomspur, torsava, vstinner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-22 11:50:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Šplíchal 2020-10-20 15:02:11 UTC
Description of problem:

When shutil.copytree() is used with symlinks=True and a symlink is
pointing to a non-existent file an exception is raised even if
ignore_dangling_symlinks is enabled.

Version-Release number of selected component (if applicable):
python3-3.9.0-1.fc33.x86_64

Additional info:
https://bugs.python.org/issue38523

Comment 1 Miro Hrončok 2020-10-20 16:58:31 UTC
Petr, is this something that needs to be tracked downstream?

Comment 2 Petr Viktorin (pviktori) 2020-10-21 00:27:45 UTC
According to the docs, ignore_dangling_symlinks only takes effect if symlinks is false: https://docs.python.org/3/library/shutil.html#shutil.copytree
Should this be made more clear?

Comment 3 Petr Šplíchal 2020-10-22 08:12:49 UTC
Thanks for clarification, Petr. Seems I've misunderstood the
ignore_dangling_symlinks parameter and got confused by a traceback
caused by wrong venv enabled. Feel free to close the issue if it
does not make sense to track it here.