Skip to content

Commit 2b5ddaa

Browse files
Put shutil.chown back on Windows
See #7384 and #7443 (comment) (thanks @AlexWaygood for diagnosing).
1 parent 8034c1c commit 2b5ddaa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

stdlib/shutil.pyi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ class _ntuple_diskusage(NamedTuple):
101101

102102
def disk_usage(path: int | StrOrBytesPath) -> _ntuple_diskusage: ...
103103

104-
if sys.platform != "win32":
105-
# while chown can be imported on Windows it doesn't actually work
106-
# see https://bugs.python.org/issue33140
107-
@overload
108-
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
109-
@overload
110-
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
111-
@overload
112-
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
113-
@overload
114-
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
104+
# While chown can be imported on Windows, it doesn't actually work;
105+
# see https://bugs.python.org/issue33140. We keep it here because it's
106+
# in __all__.
107+
@overload
108+
def chown(path: StrOrBytesPath, user: str | int, group: None = ...) -> None: ...
109+
@overload
110+
def chown(path: StrOrBytesPath, user: None = ..., *, group: str | int) -> None: ...
111+
@overload
112+
def chown(path: StrOrBytesPath, user: None, group: str | int) -> None: ...
113+
@overload
114+
def chown(path: StrOrBytesPath, user: str | int, group: str | int) -> None: ...
115115

116116
if sys.version_info >= (3, 8):
117117
@overload

0 commit comments

Comments
 (0)