mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Put shutil.chown back on Windows (#7446)
See #7384 and https://github.com/python/typeshed/pull/7443#issuecomment-1060071944 (thanks @AlexWaygood for diagnosing).
This commit is contained in:
@@ -101,17 +101,17 @@ class _ntuple_diskusage(NamedTuple):
|
||||
|
||||
def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ...
|
||||
|
||||
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: ...
|
||||
# While chown can be imported on Windows, it doesn't actually work;
|
||||
# see https://bugs.python.org/issue33140. We keep it here because it's
|
||||
# in __all__.
|
||||
@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
|
||||
|
||||
@@ -75,6 +75,3 @@ ssl.SSLSocket.recvmsg
|
||||
ssl.SSLSocket.recvmsg_into
|
||||
ssl.SSLSocket.sendmsg
|
||||
winreg.HKEYType.handle
|
||||
|
||||
# exist but do not work on Windows
|
||||
shutil.chown
|
||||
|
||||
Reference in New Issue
Block a user