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

Path.write_text() docs do not include the case that a file exists #80363

Closed
lysnikolaou opened this issue Mar 4, 2019 · 8 comments
Closed

Path.write_text() docs do not include the case that a file exists #80363

lysnikolaou opened this issue Mar 4, 2019 · 8 comments
Labels
3.8 only security fixes docs Documentation in the Doc dir

Comments

@lysnikolaou
Copy link
Contributor

BPO 36182
Nosy @methane, @JulienPalard, @lysnikolaou, @tirkarthi
PRs
  • bpo-36182: Update pathlib.Path.write_text() docs with the case of an existing file #12161
  • [3.8] bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) #15977
  • 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 2019-09-11.15:55:57.811>
    created_at = <Date 2019-03-04.12:51:21.679>
    labels = ['3.8', 'docs']
    title = 'Path.write_text() docs do not include the case that a file exists'
    updated_at = <Date 2019-09-11.15:55:57.811>
    user = 'https://github.com/lysnikolaou'

    bugs.python.org fields:

    activity = <Date 2019-09-11.15:55:57.811>
    actor = 'mdk'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-09-11.15:55:57.811>
    closer = 'mdk'
    components = ['Documentation']
    creation = <Date 2019-03-04.12:51:21.679>
    creator = 'lys.nikolaou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36182
    keywords = ['patch']
    message_count = 8.0
    messages = ['337100', '337101', '337106', '337108', '337111', '348164', '351923', '351954']
    nosy_count = 5.0
    nosy_names = ['methane', 'docs@python', 'mdk', 'lys.nikolaou', 'xtreak']
    pr_nums = ['12161', '15977']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36182'
    versions = ['Python 3.8']

    @lysnikolaou
    Copy link
    Contributor Author

    Hi,

    in the pathlib.Path.write_bytes() documentation it is clearly stated that "An existing file of the same name is overwritten." Wouldn't it make sense to include something similar to the pathlib.Path.write_text() docs. I had to quickly test it manually to find out what's happening as it wasn't clear to me if the statement applies to write_text() as well.

    @lysnikolaou lysnikolaou added the 3.8 only security fixes label Mar 4, 2019
    @lysnikolaou lysnikolaou added the docs Documentation in the Doc dir label Mar 4, 2019
    @lysnikolaou
    Copy link
    Contributor Author

    @methane
    Copy link
    Member

    methane commented Mar 4, 2019

    It may be removed accidentally by this commit.

    8477ed6#diff-56cd2f82cd518e7baf1edab64771f619

    @tirkarthi
    Copy link
    Member

    I was searching along similar lines since this was present as part of the original commit : https://hg.python.org/cpython/rev/a4da150fbfd4 . I guess it makes sense to restore the text.

    @lysnikolaou
    Copy link
    Contributor Author

    I'll submit a PR shortly.

    @lysnikolaou
    Copy link
    Contributor Author

    Pinging for review.

    @JulienPalard
    Copy link
    Member

    New changeset af636f4 by Julien Palard (Lysandros Nikolaou) in branch 'master':
    bpo-36182: Update pathlib.Path.write_text() docs (GH-12161)
    af636f4

    @JulienPalard
    Copy link
    Member

    New changeset 8936533 by Julien Palard (Miss Islington (bot)) in branch '3.8':
    bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977)
    8936533

    @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
    3.8 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants