Bug 1889790 - ignore_dangling_symlinks in shutil.copytree does not work
Summary: ignore_dangling_symlinks in shutil.copytree does not work
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.9
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-20 15:02 UTC by Petr Šplíchal
Modified: 2020-10-22 11:50 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-22 11:50:44 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Python 38523 None None None 2020-10-20 16:58:31 UTC

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 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.


Note You need to log in before you can comment on or make changes to this bug.