Issue 36182: Path.write_text() docs do not include the case that a file exists (original) (raw)
Issue36182
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/80363
classification
Title: | Path.write_text() docs do not include the case that a file exists | ||
---|---|---|---|
Type: | Stage: | resolved | |
Components: | Documentation | Versions: | Python 3.8 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | docs@python | Nosy List: | docs@python, lys.nikolaou, mdk, methane, xtreak |
Priority: | normal | Keywords: | patch |
Created on 2019-03-04 12:51 by lys.nikolaou, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 12161 | merged | lys.nikolaou,2019-03-04 13:22 | |
PR 15977 | merged | miss-islington,2019-09-11 15:08 |
Messages (8) | ||
---|---|---|
msg337100 - (view) | Author: Lysandros Nikolaou (lys.nikolaou) * ![]() |
Date: 2019-03-04 12:51 |
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. | ||
msg337101 - (view) | Author: Lysandros Nikolaou (lys.nikolaou) * ![]() |
Date: 2019-03-04 12:51 |
For reference, https://docs.python.org/3/library/pathlib.html#pathlib.Path.write_bytes. | ||
msg337106 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2019-03-04 13:02 |
It may be removed accidentally by this commit. https://github.com/python/cpython/commit/8477ed60486a22f79f257ee49f0bc18d0e73f216#diff-56cd2f82cd518e7baf1edab64771f619 | ||
msg337108 - (view) | Author: Karthikeyan Singaravelan (xtreak) * ![]() |
Date: 2019-03-04 13:07 |
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. | ||
msg337111 - (view) | Author: Lysandros Nikolaou (lys.nikolaou) * ![]() |
Date: 2019-03-04 13:12 |
I'll submit a PR shortly. | ||
msg348164 - (view) | Author: Lysandros Nikolaou (lys.nikolaou) * ![]() |
Date: 2019-07-19 10:56 |
Pinging for review. | ||
msg351923 - (view) | Author: Julien Palard (mdk) * ![]() |
Date: 2019-09-11 15:08 |
New changeset af636f4f91b8289b6dad95cb84123f6e22fd7f4f by Julien Palard (Lysandros Nikolaou) in branch 'master': bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) https://github.com/python/cpython/commit/af636f4f91b8289b6dad95cb84123f6e22fd7f4f | ||
msg351954 - (view) | Author: Julien Palard (mdk) * ![]() |
Date: 2019-09-11 15:55 |
New changeset 893653357cc83d49049debfeb9074a4ce99cd478 by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977) https://github.com/python/cpython/commit/893653357cc83d49049debfeb9074a4ce99cd478 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:12 | admin | set | github: 80363 |
2019-09-11 15:55:57 | mdk | set | status: open -> closedresolution: fixedstage: patch review -> resolved |
2019-09-11 15:55:34 | mdk | set | messages: + |
2019-09-11 15:08:21 | miss-islington | set | pull_requests: + <pull%5Frequest15610> |
2019-09-11 15:08:13 | mdk | set | nosy: + mdkmessages: + |
2019-07-19 10:56:02 | lys.nikolaou | set | messages: + |
2019-03-04 13:22:15 | lys.nikolaou | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest12159> |
2019-03-04 13:12:49 | lys.nikolaou | set | messages: + |
2019-03-04 13:07:57 | xtreak | set | nosy: + xtreakmessages: + |
2019-03-04 13:02:34 | methane | set | nosy: + methanemessages: + |
2019-03-04 12:51:47 | lys.nikolaou | set | messages: + |
2019-03-04 12:51:21 | lys.nikolaou | create |