Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-73991: Support preserving metadata in pathlib.Path.copy() #120806

Merged
merged 15 commits into from
Jul 6, 2024

Commits on Jun 20, 2024

  1. pythonGH-73991: Support preserving metadata in pathlib.Path.copy()

    Add *preserve_metadata* keyword-only argument to `pathlib.Path.copy()`,
    defaulting to false. When set to true, we copy timestamps, permissions,
    extended attributes and flags where available, like `shutil.copystat()`.
    The argument has no effect on Windows, where metadata is always copied.
    
    In the pathlib ABCs we copy the file permissions with `PathBase.chmod()`
    where supported. In the future we might want to support a more generic
    public interface for copying metadata between different types of `PathBase`
    object, but it would be premature here.
    barneygale committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    ff025ff View commit details
    Browse the repository at this point in the history
  2. Test timestamps

    barneygale committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    720a0e0 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Typos

    barneygale committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    c14d16f View commit details
    Browse the repository at this point in the history
  2. Use code from shutil.

    barneygale committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    f54925c View commit details
    Browse the repository at this point in the history
  3. Tighten conditions.

    barneygale committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    b05256b View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. Configuration menu
    Copy the full SHA
    ee2cd35 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Configuration menu
    Copy the full SHA
    da6cd5b View commit details
    Browse the repository at this point in the history
  2. Undo shutil changes.

    barneygale committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    211b861 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8129c46 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Configuration menu
    Copy the full SHA
    15cc3db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89dfad5 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    d312469 View commit details
    Browse the repository at this point in the history
  2. Fix double lookup.

    barneygale committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    547a3c3 View commit details
    Browse the repository at this point in the history
  3. Rename methods.

    barneygale committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    f584643 View commit details
    Browse the repository at this point in the history
  4. Tweaks

    barneygale committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    3206a89 View commit details
    Browse the repository at this point in the history