[issue14127] add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds

Larry Hastings report at bugs.python.org
Wed Apr 25 00:05:15 CEST 2012

Larry Hastings <larry at hastings.org> added the comment:

Attached is round 1 of my patch adding the ns= parameter to utime, futimes, and lutimes.

Some notes:

* I admit the "see utime for use of times and ns" documentation dodge
  (for both Doc and docstring) is lazy.  Yet I'm still hoping to get
  away with it.
* I removed futimens because it's now extraneous.
* I didn't add ns= to utimensat or futimesat. That's because I'm hoping to get rid of them via #14626.  (And lutimes too, come to think of it!)  I hereby promise that if they survive to June 15th I'll add ns= support
before 3.3 hits beta.
* At last, shutil.copystat (and therefore shutil.copy2) now *exactly*
  preserves timestamps. :D

keywords: +patch
Added file: http://bugs.python.org/file25354/larry.utime.ns.1.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list