Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 0ac7a49..6df4924 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -154,7 +154,7 @@
st = stat_func(src)
mode = stat.S_IMODE(st.st_mode)
- utime_func(dst, (st.st_atime, st.st_mtime))
+ utime_func(dst, ns=(st.st_atime_ns, st.st_mtime_ns))
chmod_func(dst, mode)
if hasattr(st, 'st_flags'):
try: