Skip to content

Support copy.replace() for tarfile.TarInfo #155040

Description

@serhiy-storchaka

Feature or enhancement

tarfile.TarInfo.replace() already has the semantics of copy.replace(), but the class does not support the protocol.

I propose to add __replace__ = replace, so that copy.replace(member, name='other') works like member.replace(name='other').

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Status
    No status
    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions