This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author trent
Recipients larry, pitrou, skrah, trent
Date 2012-10-16.20:04:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I've figured out what the primary problem is on these platforms: os.stat() returns st_mtime and st_atime values with nanosecond resolution, but without a corresponding utimensat(), we can only affect time with microsecond precision via utimes().

Therefore, the following logic is faulty:

    def _test_utime(self, filename, attr, utime, delta):
        # Issue #13327 removed the requirement to pass None as the
        # second argument. Check that the previous methods of passing
        # a time tuple or None work in addition to no argument.
        st0 = os.stat(filename)
        # Doesn't set anything new, but sets the time tuple way
        utime(filename, (attr(st0, "st_atime"), attr(st0, "st_mtime")))
        # Setting the time to the time you just read, then reading again,
        # should always return exactly the same times.
        st1 = os.stat(filename)
        self.assertEqual(attr(st0, "st_mtime"), attr(st1, "st_mtime"))
        self.assertEqual(attr(st0, "st_atime"), attr(st1, "st_atime"))
Date User Action Args
2012-10-16 20:04:44trentsetrecipients: + trent, pitrou, larry, skrah
2012-10-16 20:04:44trentsetmessageid: <>
2012-10-16 20:04:44trentlinkissue15745 messages
2012-10-16 20:04:43trentcreate