python / python/cpython

shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)

Open
#81,338 43 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance stdlib type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 37157
Nosy @giampaolo, @albertz, @desbma, @koobs, @pablogsal
Files
  • cow.diff
  • cow2.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2019-06-04.21:36:40.594>
    labels = ['library', '3.9', 'performance']
    title = 'shutil: add reflink=False to file copy functions to control clone/CoW copies (use copy_file_range)'
    updated_at = <Date 2021-10-07.19:23:42.385>
    user = 'https://github.com/vstinner'
    

    bugs.python.org fields:

    activity = <Date 2021-10-07.19:23:42.385>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2019-06-04.21:36:40.594>
    creator = 'vstinner'
    dependencies = []
    files = ['48390', '48393']
    hgrepos = []
    issue_num = 37157
    keywords = ['patch']
    message_count = 14.0
    messages = ['344648', '344651', '344667', '344692', '344694', '344697', '344702', '344709', '350623', '384015', '384105', '403414', '403418', '403423']
    nosy_count = 6.0
    nosy_names = ['giampaolo.rodola', 'Albert.Zeyer', 'desbma', 'koobs', 'pablogsal', 'dulanic']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue37157'
    versions = ['Python 3.9']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start with Python's shutil file-copy functions and review the linked cow.diff and cow2.diff proposals. Trace how reflink=False should control clone/CoW copies through copy_file_range, then verify the intended behavior across the affected copy operations and their existing tests.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    operating-systems
    Issue type
    Feature
    Difficulty
    5/5
    Estimated time
    Over a week
    Activity status
    Stale
    Clarity
    Mostly clear
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.