stdlib: shutil.chown does not work on Windows (#7384)

This commit is contained in:
Martin Fischer
2022-02-25 21:37:36 +01:00
committed by Jelle Zijlstra
parent d63dc4b002
commit 8034c1c48c
2 changed files with 15 additions and 8 deletions

View File

@@ -100,14 +100,18 @@ class _ntuple_diskusage(NamedTuple):
free: int
def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ...
@overload
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
if sys.platform != "win32":
# while chown can be imported on Windows it doesn't actually work
# see https://bugs.python.org/issue33140
@overload
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
@overload
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
if sys.version_info >= (3, 8):
@overload