Serhiy Storchaka
9d3b53c47f
gh-71189: Support all-but-last mode in os.path.realpath() (GH-117562)
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
2025-07-30 10:19:19 +03:00
sobolevn
b31e5d6de1
gh-136437: Convert more `os.path
` functions to positional-only in the docs ( #136970 )
2025-07-22 14:38:33 +01:00
sobolevn
3224429450
gh-136437: Document os.path.dirname
as accepting only pos-only ( #136946 )
Tests / Cross build Linux (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
2025-07-21 18:22:58 +00:00
sobolevn
b5428bb0e7
gh-136437: Document some os.path
functions as requiring pos-only ( #136812 )
2025-07-21 21:01:43 +03:00
Ran Benita
7e10a103df
gh-136682: Remove incorrect statement that os.path.samestat
accepts file-like objects ( #136683 )
2025-07-15 14:49:11 +02:00
Oskar Roesler
591abcc01f
gh-81520: Document unexpected os.path.ismount
behaviour with btrfs subvolumes (GH-136058)
2025-07-09 11:54:58 -04:00
Łukasz Langa
3612d8f517
gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing')
( #135037 )
...
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 12:42:11 +02:00
Matth-M
7a5c4103b0
Doc: Improve wording of `os.path.commonpath()
` ( #122627 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-03 11:18:59 +00:00
Serhiy Storchaka
1a0c7b9ba4
gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907)
2024-07-19 08:06:02 +00:00
CBerJun
bf74db731b
gh-121461: Fix os.path.normpath documentation indentation ( #121466 )
2024-07-08 03:51:03 +00:00
Ned Batchelder
bcb435ee8f
docs: module page titles should not start with a link to themselves ( #117099 )
2024-05-08 20:34:40 +01:00
Nice Zombies
a23fa3368e
gh-117945: Fix os.path.ismount()
documentation ( #117947 )
2024-04-16 15:55:53 -07:00
Barney Gale
630df37116
GH-117546: Fix symlink resolution in os.path.realpath('loop/../link')
( #117568 )
...
Continue resolving symlink targets after encountering a symlink loop, which
matches coreutils `realpath` behaviour.
2024-04-10 18:17:18 +01:00
Nice Zombies
73906d5c90
gh-117360: Clearer wording in os.path.lexists() docs ( #117679 )
...
Co-authored-by: Zachary Ware <zach@python.org>
2024-04-09 23:00:41 +02:00
Nice Zombies
0821923aa9
gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115)
2024-03-25 22:55:11 +00:00
Shantanu
edea0e7d99
gh-114709: Mark commonpath behaviour as changed in 3.13 ( #115639 )
2024-02-18 14:08:50 -08:00
Sebastian Rittau
371c970886
gh-114709: Fix exceptions raised by posixpath.commonpath ( #114710 )
...
Fix the exceptions raised by posixpath.commonpath
Raise ValueError, not IndexError when passed an empty iterable. Raise
TypeError, not ValueError when passed None.
2024-02-18 00:24:58 -08:00
Barney Gale
7e31d6dea2
gh-88569: add ntpath.isreserved()
( #95486 )
...
Add `ntpath.isreserved()`, which identifies reserved pathnames such as "NUL", "AUX" and "CON".
Deprecate `pathlib.PurePath.is_reserved()`.
---------
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2024-01-26 18:14:24 +00:00
Barney Gale
e4ff131e01
GH-44626, GH-105476: Fix ntpath.isabs()
handling of part-absolute paths ( #113829 )
...
On Windows, `os.path.isabs()` now returns `False` when given a path that
starts with exactly one (back)slash. This is more compatible with other
functions in `os.path`, and with Microsoft's own documentation.
Also adjust `pathlib.PureWindowsPath.is_absolute()` to call
`ntpath.isabs()`, which corrects its handling of partial UNC/device paths
like `//foo`.
Co-authored-by: Jon Foster <jon@jon-foster.co.uk>
2024-01-13 07:36:05 +00:00
박문식
d33aa18f15
gh-82367: Use FindFirstFile
Win32 API in ntpath.realpath()
(GH-110298)
...
* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`
breaks out of traversing a series of paths where a (handled)
`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.
* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS
style names.
2023-10-05 09:49:07 -05:00
Serhiy Storchaka
d036db728e
gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)
2023-07-21 12:34:30 +03:00
Steve Dower
bfd20d257e
gh-104803: Implement ntpath.isdevdrive for checking whether a path is on a Windows Dev Drive (GH-104805)
2023-05-29 10:05:32 +01:00
Adam Turner
d0122372f2
GH-97950: Use new-style index directive ('module') ( #103996 )
...
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
* Use new-style index directive ('module') - Tutorial
* Uncomment module removal in pairindextypes
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
2023-05-04 10:17:12 +02:00
Shantanu
909a674693
gh-77607: Improve accuracy of os.path.join docs ( #101406 )
...
This is a follow-up to #100811 .
One of the changes in that PR isn't accurate in that
`os.path.join('', '')` will not end in a separator.
This reverts that change to the previous wording that used "only", but
explicitly calls out the case where the last part ends in a separator,
which is what caused confusin in #77607 and motivated the change
in #100811 .
2023-01-30 21:39:30 -08:00
Barney Gale
e5b08ddddf
gh-101000: Add os.path.splitroot() ( #101002 )
...
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-01-27 00:28:27 +00:00
Shantanu
53455a319f
gh-100783: fix os.path.join documentation ( #100811 )
...
- Use "drive", not "drive letter", because of UNC paths
- Previous components are not thrown away from relative drive letters
- Use "segment" instead of "component" for consistency with pathlib
- Other miscellaneous improvements
2023-01-08 00:51:30 -08:00
Charles Machalow
1b2de89bce
gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)
2022-11-22 17:19:34 +00:00
Will Hawkins
bd7d0e875e
Fix capitalization of Unix in documentation ( #96913 )
2022-10-01 16:41:06 -07:00
Serhiy Storchaka
f79547a429
gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS (GH-95527)
...
If an HTTP link is redirected to a same looking HTTPS link, the latter can
be used directly without changes in readability and behavior.
It protects from a men-in-the-middle attack.
This change does not affect Python examples.
2022-08-04 10:13:49 +03:00
Barney Gale
2ba0fd5767
gh-81790: support "UNC" device paths in ntpath.splitdrive()
(GH-91882)
2022-06-10 16:59:55 +01:00
CAM Gerlach
f1bbcba74f
gh-76773: Update docs mentioning no-longer-supported Windows versions & features (GH-92529)
2022-05-10 09:30:32 +03:00
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