[issue42999] `pathlib.Path.link_to()` documentation is misleading
New submission from Barney Gale <barney.gale@gmail.com>: 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. ---------- assignee: docs@python components: Documentation messages: 385474 nosy: barneygale, docs@python priority: normal severity: normal status: open title: `pathlib.Path.link_to()` documentation is misleading type: behavior _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Barney Gale <barney.gale@gmail.com>: ---------- keywords: +patch pull_requests: +23116 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18909 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Jay Chu <tothesong@gmail.com>: ---------- nosy: +tothesong _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Barney Gale <barney.gale@gmail.com>: ---------- pull_requests: +23117 pull_request: https://github.com/python/cpython/pull/24294 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Steve Dower <steve.dower@python.org> added the comment: New changeset 8aac1bea2eeac25a49f8912b67aacbedf9bc7934 by Barney Gale in branch 'master': bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) https://github.com/python/cpython/commit/8aac1bea2eeac25a49f8912b67aacbedf9b... ---------- nosy: +steve.dower _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- pull_requests: +23993 pull_request: https://github.com/python/cpython/pull/25257 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Steve Dower <steve.dower@python.org> added the comment: New changeset 34f93002bac980176a670ce2a4038c3be84effed by Steve Dower in branch '3.9': bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) https://github.com/python/cpython/commit/34f93002bac980176a670ce2a4038c3be84... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- pull_requests: +23994 pull_request: https://github.com/python/cpython/pull/25258 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Steve Dower <steve.dower@python.org> added the comment: New changeset 9f578734624d1c0172220556ca97898730144172 by Steve Dower in branch '3.8': bpo-42999: Expand and clarify pathlib.Path.link_to() documentation. (GH-24294) https://github.com/python/cpython/commit/9f578734624d1c0172220556ca978987301... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42999> _______________________________________
participants (3)
-
Barney Gale -
Jay Chu -
Steve Dower