Jack DeVries
468314cc8b
gh-82849: revise intro to os.path.rst (GH-32232)
...
* revise the first paragraph of docs for os.path
* add a mention of `os.PathLike` protocol
* remove warnings rendered irrelevant by :pep:`383` and :pep:`529`
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-15 21:23:07 -07:00
Irit Katriel
51700bf08b
bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods (GH-30347)
2022-01-03 20:10:07 +00:00
Jake Stockwin
aa0894b379
bpo-35183: Add typical examples to os.path.splitext docs (GH-27286)
2021-08-02 19:01:53 +02:00
Furkan Onder
66c5853406
bpo-26329: update os.path.normpath documentation (GH-20138)
...
* bpo-26329: update os.path.normpath documentation
* Update os.path.rst
* Update posixpath.py
* update Pathname Resolution note
2021-07-12 09:48:01 -03:00
Barney Gale
baecfbd849
bpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path (GH-25264)
...
Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.
2021-04-28 16:50:17 +01:00
Zackery Spytz
67c0b3d89c
bpo-41661: Document os.path.relpath() exception on Windows with different drives (GH-25346)
2021-04-12 16:39:31 +01:00
Barney Gale
3f3d82b848
bpo-39899: os.path.expanduser(): don't guess other Windows users' home directories if the basename of the current user's home directory doesn't match their username. (GH-18841)
...
This makes `ntpath.expanduser()` match `pathlib.Path.expanduser()` in this regard, and is more in line with `posixpath.expanduser()`'s cautious approach.
Also remove the near-duplicate implementation of `expanduser()` in pathlib, and by doing so fix a bug where KeyError could be raised when expanding another user's home directory.
2021-04-07 23:50:13 +01:00
Jared Sutton
21a2cabb37
bpo-43620: Remove reference to os.sep from os.path.join() doc ( #25025 )
...
- removed ambiguous reference to os.sep from os.path.join() doc
2021-03-26 12:02:32 -04:00
Kexuan Sun
53f78ec9e1
Doc: Improve consistency of os.path.normcase with other os.path functions (GH-14004)
2019-09-13 14:01:02 +01:00
Steve Dower
75e064962e
bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287)
2019-08-21 13:43:06 -07:00
Makdon
95492032c4
bpo-6689: os.path.commonpath raises ValueError for different drives isn't documented (GH-14045)
...
It would raise ValueError("Paths don't have the same drive") if the paths on different drivers, which is not documented.
os.path.commonpath raises ValueError when the *paths* are in different drivers, but it is not documented.
Update the document according @Windsooon 's suggestion.
It actually raise ValueError according line 355 of [test of path](https://github.com/python/cpython/blob/master/Lib/test/test_ntpath.py )
https://bugs.python.org/issue6689
2019-06-13 06:59:49 -07:00
Kexuan Sun
32d1458b2e
Changes to the documentation of normcase (GH-4725)
2019-05-13 07:38:20 -04:00
Steve Dower
8ef864d50f
bpo-36264: Updates documentation for change to expanduser on Windows (GH-12294)
2019-03-12 15:15:26 -07:00
Serhiy Storchaka
32ebd8508d
bpo-29707: Document that os.path.ismount() is not able to reliable detect bind mounts. (GH-11238)
2019-01-15 10:55:40 +02:00
Victor Stinner
d7538dd5e3
bpo-35471: Remove the macpath module (GH-11129)
...
Python 2.4 dropped MacOS 9 support. The macpath module was deprecated
in Python 3.7. This change removes it.
2018-12-14 13:37:26 +01:00
Serhiy Storchaka
913876d824
bpo-35054: Add yet more index entries for symbols. (GH-10121)
2018-10-28 13:41:26 +02:00
Stéphane Wirtel
e483f02423
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
2018-10-26 12:52:11 +02:00
Serhiy Storchaka
ddb961d2ab
bpo-35054: Add more index entries for symbols. (GH-10064)
2018-10-26 09:00:49 +03:00
Cheryl Sabella
2d6097d027
bpo-11233: Create availability directive for documentation (GH-9692)
...
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
2018-10-12 16:55:20 +02:00
Serhiy Storchaka
0185f34ddc
bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant to invalid paths. ( #7695 )
...
Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(),
os.path.isfile(), os.path.islink(), and os.path.ismount() now return False
instead of raising ValueError or its subclasses UnicodeEncodeError
and UnicodeDecodeError for paths that contain characters or bytes
unrepresentative at the OS level.
2018-09-18 11:28:51 +03:00
Cheryl Sabella
b3dd18d403
bpo-15221: Update os.path.is*() documentation (GH-5185)
...
`os.path.is*()` can return False if the file can't be accessed.
The behaviour is documented in details in `os.path.exists()`.
Link to `os.path.exists()` from `os.path.is*()`.
2018-01-14 20:57:51 -08:00
Victor Stinner
01b5aab7bf
bpo-31827: Remove os.stat_float_times() (GH-4061)
2017-10-24 02:02:00 -07:00
Serhiy Storchaka
9ed707eb4c
Issue #29197 : Removed deprecated function ntpath.splitunc().
2017-01-13 20:55:05 +02:00
Brett Cannon
6fa7aada9b
Issue #26027 , #27524 : Document the support for path-like objects in os and os.path.
...
This completes PEP 519.
2016-09-06 15:55:02 -07:00
Terry Jan Reedy
fa089b9b0b
Issue #22558 : Add remaining doc links to source code for Python-coded modules.
...
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Ned Deily
32db43867c
Issue 27216: Fix typo (noticed by Alex Chan).
2016-06-04 09:40:40 -07:00
Martin Panter
2eb819f7a8
Issue #25523 : Merge "a" to "an" fixes from 3.4 into 3.5
2015-11-02 04:04:57 +00:00
Martin Panter
7462b64911
Issue #25523 : Correct "a" article to "an" article
...
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Yury Selivanov
de11561862
Further improve os.path.commonprefix() docs.
...
Patch by Serhiy Storchaka.
2015-08-19 09:53:28 -04:00
Yury Selivanov
80ac11f95f
docs: Improve docs for os.path.commonprefix
2015-08-17 23:43:43 -04:00
Serhiy Storchaka
3822093143
Issue #10395 : Added os.path.commonpath(). Implemented in posixpath and ntpath.
...
Based on patch by Rafik Draoui.
2015-03-31 15:31:53 +03:00
Zachary Ware
a13dab47cb
Issue #15414 : Clean and correct the os.path.join docs.
...
In particular, correctly describe the behavior of ntpath.join.
Based on a patch by Dave Sawyer.
2014-10-10 16:03:14 -05:00
Benjamin Peterson
f6f78e1d9d
clarify that islink only really works if python knows about symlinks ( closes #13143 )
...
Patch from Yayoi Ukai.
2014-06-22 17:59:35 -07:00
Benjamin Peterson
409a1be6cf
improve start default for relpath
2014-03-20 12:39:53 -05:00
Larry Hastings
3732ed2414
Merge in all documentation changes since branching 3.4.0rc1.
2014-03-15 21:13:56 -07:00
Serhiy Storchaka
0e90e99188
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:19:53 +02:00
Serhiy Storchaka
fbc1c26803
Issue #19795 : Improved markup of True/False constants.
2013-11-29 12:17:13 +02:00
Antoine Pitrou
31119e4f10
Issue #19673 : Add pathlib to the stdlib as a provisional module (PEP 428).
2013-11-22 17:38:12 +01:00
Serhiy Storchaka
690a6a95bd
Issue #19207 : Improved cross-references in the os, os.path, and posix modules
...
documentation.
2013-10-13 20:13:37 +03:00
Serhiy Storchaka
dab8354920
Issue #19207 : Improved cross-references in the os, os.path, and posix modules
...
documentation.
2013-10-13 20:12:43 +03:00
Georg Brandl
1cb28a1be8
merge with 3.3
2013-10-06 09:53:11 +02:00
Georg Brandl
f6324941f0
Clarify docs for os.path.getctime on Unix: it is the inode (metadata) change time
2013-10-06 09:52:55 +02:00
R David Murray
d0a03ad139
#18389 : Clarify that relpath does not access the file system.
...
Initial patch by Madison May.
2013-07-12 17:43:53 -04:00
R David Murray
ce10fab9f6
#18389 : Clarify that relpath does not access the file system.
...
Initial patch by Madison May.
2013-07-12 17:43:11 -04:00
Terry Jan Reedy
15cddb498e
Merge with 3.3
2013-03-17 15:29:19 -04:00
Terry Jan Reedy
b271727bad
Merge with 3.2
2013-03-17 15:28:52 -04:00
Terry Jan Reedy
f3460414d5
Issue #17415 : Trim trailing whitespace
2013-03-17 15:28:10 -04:00
Terry Jan Reedy
a52c2d6d2f
Merge with 3.3
2013-03-17 15:25:12 -04:00
Terry Jan Reedy
3380170ea5
Merge with 3.2
2013-03-17 15:22:00 -04:00
Terry Jan Reedy
ec6e132987
Issue #17415 : Clarify 'this' referent by moving containing sentence just after
...
the sentence referred to. Make other minor edits to improve flow.
2013-03-17 15:21:26 -04:00