Rob Nelson added the comment:
The code referenced in the previous comment only hits for tarfiles built from
Streams.
The same (incorrect) code exists in the gzip.py library as well, and hits the
more common usecase of building a tar.gz from a set of files on disk.
def _write_gzip_header
New submission from Rob nelson :
The ignore_dangling_symlinks attribute in shutil.copytree is not passed down
recursively, resulting in dangling symlinks located anywhere other than the
root of the source tree to raise an error.
The line causing the error for 3.9:
https://github.com/python