Navigation Menu

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pathlib.Path.link_to() documentation is misleading #87165

Closed
barneygale mannequin opened this issue Jan 22, 2021 · 4 comments
Closed

pathlib.Path.link_to() documentation is misleading #87165

barneygale mannequin opened this issue Jan 22, 2021 · 4 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@barneygale
Copy link
Mannequin

barneygale mannequin commented Jan 22, 2021

BPO 42999
Nosy @zooba, @barneygale, @escape0707
PRs
  • bpo-39950: add pathlib.Path.hardlink_to() method that supersedes link_to() #18909
  • bpo-42999: expand and clarify pathlib.Path.link_to() documentation. #24294
  • [3.9] bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) #25257
  • [3.8] bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) #25258
  • 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 = <Date 2021-04-07.18:33:34.722>
    created_at = <Date 2021-01-22.04:24:20.233>
    labels = ['type-bug', 'docs']
    title = '`pathlib.Path.link_to()` documentation is misleading'
    updated_at = <Date 2021-04-07.18:33:34.721>
    user = 'https://github.com/barneygale'

    bugs.python.org fields:

    activity = <Date 2021-04-07.18:33:34.721>
    actor = 'steve.dower'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-04-07.18:33:34.722>
    closer = 'steve.dower'
    components = ['Documentation']
    creation = <Date 2021-01-22.04:24:20.233>
    creator = 'barneygale'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42999
    keywords = ['patch']
    message_count = 4.0
    messages = ['385474', '390440', '390450', '390460']
    nosy_count = 4.0
    nosy_names = ['docs@python', 'steve.dower', 'barneygale', 'escape0707']
    pr_nums = ['18909', '24294', '25257', '25258']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42999'
    versions = []

    @barneygale
    Copy link
    Mannequin Author

    barneygale mannequin commented Jan 22, 2021

    Compare the documentation of symlink_to() and link_to():

    .. method:: Path.symlink_to(target, target_is_directory=False)
    Make this path a symbolic link to *target*.

    .. method:: Path.link_to(target)
    Create a hard link pointing to a path named *target*.

    In fact, link_to() does something like:

    Make *target* a hard link to this path.
    

    Which is unexpected given the naming and inconsistency with symlink_to(), but it's the way the current implementation works, and so the documentation should reflect that.

    Adding a replacement hardlink_to() function is covered here in bpo-39950.

    @barneygale barneygale mannequin assigned docspython Jan 22, 2021
    @barneygale barneygale mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Jan 22, 2021
    @barneygale barneygale mannequin assigned docspython Jan 22, 2021
    @barneygale barneygale mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Jan 22, 2021
    @zooba
    Copy link
    Member

    zooba commented Apr 7, 2021

    New changeset 8aac1be by Barney Gale in branch 'master':
    bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294)
    8aac1be

    @zooba
    Copy link
    Member

    zooba commented Apr 7, 2021

    New changeset 34f9300 by Steve Dower in branch '3.9':
    bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294)
    34f9300

    @zooba
    Copy link
    Member

    zooba commented Apr 7, 2021

    New changeset 9f57873 by Steve Dower in branch '3.8':
    bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294)
    9f57873

    @zooba zooba closed this as completed Apr 7, 2021
    @zooba zooba closed this as completed Apr 7, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant