STINNER Victor <victor.stin...@gmail.com> added the comment: The following changes has to be done to fix this issue:
- add st_atime_ns, st_mtime_ns and st_ctime_ns fileds to os.stat() result: number of nanoseconds since Epoch (1970.1.1), an integer - change os.*utime*() functions (see below) - shutil.copystat() should use os.utime(ns=...) and os.ltime(ns=...) List of the os.*utime*() functions: - os.futimes(): use futimens() or futimes() - os.futimens(): use futimens(); UTIME_NOW and UTIME_OMIT flags - os.futimesat(): use utimensat() or futimesat() - os.lutimes(): use futimesat(AT_SYMLINK_NOFOLLOW) or lutimes() - os.utime(): use SetFileTime() (Windows), utimensat(), utimes() or utime() - os.utimensat(): use utimensat(); UTIME_NOW and UTIME_OMIT flags Changes on the os.*utime*() functions: - add ns keyword to: * os.futimes() * os.futimesat() * os.lutimes() * os.utime() - except a number of nanoseconds instead of a number of seconds: * os.futimens() * os.utimensat() The ns keyword is an exclusive parameter with existing times parameter. Examples: * seconds: os.utime(name, (1, 2)) * seconds: os.utime(name, times=(1, 2)) * nanoseconds: os.utime(name, ns=(1, 2)) * INVALID! os.utime(name, (1, 2), ns=(1, 2)) * INVALID! os.utime(name, times=(1, 2), ns=(1, 2)) I don't want to remove os.futimens() and os.utimensat() because they add a feature: UTIME_NOW and UTIME_OMIT flags. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14127> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com