New submission from Delgan <delgan...@gmail.com>:

Hi.

Currently, trying to use "os.utime(path, timestamps, follow_symlinks=False)" 
raises a exception on Windows: "NotImplementedError: utime: follow_symlinks 
unavailable on this platform".

Looking at the Win32 API it seems possible to open a symbolic link by 
specifying the "FILE_FLAG_OPEN_REPARSE_POINT" flag: 
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#symbolic-link-behavior

Do you think it would be possible to update "os.utime()" implementation and 
optionally pass the flag here: 
https://github.com/python/cpython/blob/ca78130d7eb5265759697639e42487ec6d0a4caf/Modules/posixmodule.c#L5516
 ?

----------
components: Library (Lib)
messages: 411399
nosy: Delgan
priority: normal
severity: normal
status: open
title: Add "follow_symlinks=False" support for "os.utime()" on Windows
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46490>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to