Return a deep copy of self with the given attributes replaced.
tarfile/TarInfo.replace
TarInfo.replace