diff --git a/Lib/shutil.py b/Lib/shutil.py index 273a7d2f43..124116e2fb 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -10,6 +10,7 @@ import fnmatch import collections import errno +import warnings try: import zlib @@ -1306,6 +1307,10 @@ def chown(path, user=None, group=None): user and group can be the uid/gid or the user/group names, and in that case, they are converted to their respective uid/gid. """ + if os.name == 'nt': + warnings.warn('shutil.chown is not supported on Windows platforms. ' + 'It will become undefined on these platforms in future ' + 'versions of Python.', DeprecationWarning) sys.audit('shutil.chown', path, user, group) if user is None and group is None: