Issue #19715: try the utime(..., None) approach again, now that it should be more precise under Windows
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 06cbae5..e73eca7 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -6,7 +6,6 @@
import posixpath
import re
import sys
-import time
import weakref
try:
import threading
@@ -1076,9 +1075,8 @@
# First try to bump modification time
# Implementation note: GNU touch uses the UTIME_NOW option of
# the utimensat() / futimens() functions.
- t = time.time()
try:
- self._accessor.utime(self, (t, t))
+ self._accessor.utime(self, None)
except OSError:
# Avoid exception chaining
pass