diff options
author | shadchin <shadchin@yandex-team.com> | 2025-06-18 20:33:12 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2025-06-18 21:16:29 +0300 |
commit | 2fcfb855cd7780ab07751cc16c80a0a58168668a (patch) | |
tree | 078f7a88f8a93e87eb89e67e0f43120c0e01528f /contrib/tools/python3/Lib/genericpath.py | |
parent | 6635b88fd4c0ff9c8545c3b277eaf5debaf40b8f (diff) | |
download | ydb-2fcfb855cd7780ab07751cc16c80a0a58168668a.tar.gz |
Update Python 3 to 3.12.11
commit_hash:0054a0810a95d3f1aa3d36410976d43e03ff7e86
Diffstat (limited to 'contrib/tools/python3/Lib/genericpath.py')
-rw-r--r-- | contrib/tools/python3/Lib/genericpath.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/tools/python3/Lib/genericpath.py b/contrib/tools/python3/Lib/genericpath.py index 1bd5b3897c3..233f7a3c67d 100644 --- a/contrib/tools/python3/Lib/genericpath.py +++ b/contrib/tools/python3/Lib/genericpath.py @@ -8,7 +8,7 @@ import stat __all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime', 'getsize', 'isdir', 'isfile', 'islink', 'samefile', 'sameopenfile', - 'samestat'] + 'samestat', 'ALLOW_MISSING'] # Does a path exist? @@ -165,3 +165,12 @@ def _check_arg_types(funcname, *args): f'os.PathLike object, not {s.__class__.__name__!r}') from None if hasstr and hasbytes: raise TypeError("Can't mix strings and bytes in path components") from None + +# A singleton with a true boolean value. +@object.__new__ +class ALLOW_MISSING: + """Special value for use in realpath().""" + def __repr__(self): + return 'os.path.ALLOW_MISSING' + def __reduce__(self): + return self.__class__.__name__ |