| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
`os.path.realpath(strict='allow_missing')` (GH-135037) (GH-135064)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
(cherry picked from commit 3612d8f51741b11f36f8fb0494d79086bac9390a)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
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>
|
| |
|
|
|
|
|
| |
mode (GH-128328) (GH-134204)
(cherry picked from commit d55e11b8049e3abf3cc187b4958224b225a39897)
Co-authored-by: BecoKo <koev_v@yahoo.com>
|
| |
|
|
|
| |
(cherry picked from commit 4b00aba42e4d9440d22e399ec2122fe8601bbe54)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
| |
|
|
|
|
| |
gh-120417: Remove unused imports in the stdlib (GH-120420)
(cherry picked from commit 4c6d4f5cb33e48519922d635894eef356faddba2)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
| |
posixmodule (GH-118355)
(cherry picked from commit 96b392df303b2cfaea823afcb462c0b455704ce8)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-118755)
(cherry picked from commit b64182550f73e556344bd754d32e3be5d22a74e1)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Refactor out _get_bothseps() call from the loop.
|
| |
|
|
|
| |
Replace map() with a method call in the loop body.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
| | |
|
| |
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
are embedded nulls (GH-108248)
* gh-106242: Make ntpath.realpath errors consistent with abspath when there are embedded nulls
* Update 2023-08-22-00-36-57.gh-issue-106242.q24ITw.rst
mention Windows and the former incorrect ValueError.
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
| |
Windows Dev Drive (GH-104805)
|
| |
|
|
| |
(GH-103221)
|
| | |
|
| |
|
| |
Co-authored-by: Eryk Sun <eryksun@gmail.com>
|
| |
|
|
| |
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
| |
splitdrive() (GH-100351)
This brings the Python implementation of `ntpath.normpath()` in line with the C implementation added in 99fcf15
Co-authored-by: Eryk Sun <eryksun@gmail.com>
|
| | |
|
| | |
|
| |
|
|
| |
to directly query OS properties (GH-96289)
|
| | |
|
| |
|
|
| |
case-folding (GH-32010)
|
| |
|
| |
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.
|
| |
|
|
|
| |
The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code.
This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
|
| |
|
|
|
| |
(GH-25264)
Also adds a new "strict" argument to realpath() to avoid changing the default behaviour of pathlib while sharing the implementation.
|
| |
|
|
| |
user's home directory in ntpath.expanduser() (GH-25277)
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Ensure isabs() is always True for \\?\ prefixed paths
Avoid unnecessary usage of readlink() to avoid resolving broken links incorrectly
Ensure shutil tests run in test directory
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
(GH-15369)
|
| | |
|
| |
|
| |
https://bugs.python.org/issue30427
|
| | |
|
| |
|
| |
Regression in b0bf51b32240369ccb736dc32ff82bb96f375402.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
and Windows CE is no longer a relevant platform for Python.
|
| |
|
|
|
|
| |
os.path.
Thanks to Jelle Zijlstra for the initial patch against posixmodule.c.
|