Remove macpath (removed in Python 3.8) (#11236)

This commit is contained in:
Sebastian Rittau
2024-01-04 15:10:36 +01:00
committed by GitHub
parent 4e5f7a7142
commit 1b2cabce4d
2 changed files with 0 additions and 105 deletions

View File

@@ -170,7 +170,6 @@ linecache: 3.0-
locale: 3.0-
logging: 3.0-
lzma: 3.3-
macpath: 3.0-3.7
mailbox: 3.0-
mailcap: 3.0-3.12
marshal: 3.0-

View File

@@ -1,104 +0,0 @@
from _typeshed import BytesPath, StrOrBytesPath, StrPath
from genericpath import (
commonprefix as commonprefix,
exists as exists,
getatime as getatime,
getctime as getctime,
getmtime as getmtime,
getsize as getsize,
isdir as isdir,
isfile as isfile,
samefile as samefile,
sameopenfile as sameopenfile,
samestat as samestat,
)
from os import PathLike
# Re-export common definitions from posixpath to reduce duplication
from posixpath import (
abspath as abspath,
curdir as curdir,
defpath as defpath,
devnull as devnull,
expanduser as expanduser,
expandvars as expandvars,
extsep as extsep,
isabs as isabs,
lexists as lexists,
pardir as pardir,
pathsep as pathsep,
sep as sep,
splitdrive as splitdrive,
splitext as splitext,
supports_unicode_filenames as supports_unicode_filenames,
)
from typing import AnyStr, overload
__all__ = [
"normcase",
"isabs",
"join",
"splitdrive",
"split",
"splitext",
"basename",
"dirname",
"commonprefix",
"getsize",
"getmtime",
"getatime",
"getctime",
"islink",
"exists",
"lexists",
"isdir",
"isfile",
"expanduser",
"expandvars",
"normpath",
"abspath",
"curdir",
"pardir",
"sep",
"pathsep",
"defpath",
"altsep",
"extsep",
"devnull",
"realpath",
"supports_unicode_filenames",
]
altsep: str | None
@overload
def basename(s: PathLike[AnyStr]) -> AnyStr: ...
@overload
def basename(s: AnyStr) -> AnyStr: ...
@overload
def dirname(s: PathLike[AnyStr]) -> AnyStr: ...
@overload
def dirname(s: AnyStr) -> AnyStr: ...
@overload
def normcase(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def normcase(path: AnyStr) -> AnyStr: ...
@overload
def normpath(s: PathLike[AnyStr]) -> AnyStr: ...
@overload
def normpath(s: AnyStr) -> AnyStr: ...
@overload
def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
@overload
def realpath(path: AnyStr) -> AnyStr: ...
def islink(s: StrOrBytesPath) -> bool: ...
# Mypy complains that the signatures overlap, but things seem to behave correctly anyway.
@overload
def join(s: StrPath, *paths: StrPath) -> str: ...
@overload
def join(s: BytesPath, *paths: BytesPath) -> bytes: ...
@overload
def split(s: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ...
@overload
def split(s: AnyStr) -> tuple[AnyStr, AnyStr]: ...