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

2018-01-17 Thread Jesús Cea Avión
Change by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

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

2012-06-22 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Closing this, as I have now removed os.utimensat and os.futimesat. As well as os.futimens, os.futimes, and os.lutimes. And in fact retooled os.utime in a pretty major way. (See #14626.) -- resolution: - fixed stage: patch review

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

2012-05-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 709850f1ec67 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/709850f1ec67 --

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

2012-05-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 05274ab06182 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/05274ab06182 --

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

2012-05-04 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: bba131e48852 causes crashes on Windows. The attached patch fixes the crash and makes test_os pass for me. However, using PyErr_ExceptionMatches(PyExc_RuntimeError) to check whether to try again using narrow strings is ugly. Maybe

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: TBH I don't understand why it should crash, and therefore how your patch helps. Trying again using narrow strings should always work; indeed, the code did that before I touched it. Can you describe how it crashes? The important part

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Without the check for RuntimeError os.utime(foo, times=(5,5), ns=(5,5)) raises TypeError(TypeError: 'str' does not support the buffer interface) because we have fallen through to the narrow path. The correct error is

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

2012-05-04 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Let me recap, just to make sure I have it straight. There are two errors on Windows: * The ! on (what is currently) line 3770 is wrong: if (!utime_read_time_arguments(ua)) { * If you pass in a Unicode string but also pass in both times

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Let me recap, just to make sure I have it straight. There are two errors on Windows: That's right. The patch looks good and passes for me on Windows. -- ___ Python tracker

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

2012-05-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fc5d2f4291ac by Larry Hastings in branch 'default': Issue #14127: Fix two bugs with the Windows implementation. http://hg.python.org/cpython/rev/fc5d2f4291ac -- ___

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: There is another problem causing a fatal error in test_posix on Unix. The attached patch fixes it: *ua-path should be decrefed not ua-path. -- Added file: http://bugs.python.org/file25452/utime_read_time_arguments.patch

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

2012-05-04 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Looks good to me. You're a core contributor, yes? If not let me know and I'll commit it. Though I must admit I'm baffled how I haven't seen that crash. I've run the unit tests a zillion times on this patch. --

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Looks good to me. You're a core contributor, yes? If not let me know and I'll commit it. I will commit. Though I must admit I'm baffled how I haven't seen that crash. I've run the unit tests a zillion times on this patch. Were you

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

2012-05-04 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: By the unit tests I meant I ran the whole suite: Lib/test/regrtest.py. I know that runs test_os, and I assume it runs test_posix too. I just ran test_posix by hand and it passed. I'm developing on Linux (64-bit) in case that helps.

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

2012-05-04 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: I'm developing on Linux (64-bit) in case that helps. I tested it on 32 bit Linux. I have committed it, but I forgot to put the issue number in the commit message. -- ___ Python tracker

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

2012-05-04 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Revision 4deb7c1f49b9 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___

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

2012-05-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bba131e48852 by Larry Hastings in branch 'default': Issue #14127: Add ns= parameter to utime, futimes, and lutimes. http://hg.python.org/cpython/rev/bba131e48852 -- ___

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

2012-05-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: @haypo: Thanks for pointing that out buildbot failure! The OpenIndiana buildbot was bit by a rounding error. I fixed it by adding in a fudge factor it--I snuck in one last change just now. I weakened the unit test as follows: -

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

2012-05-03 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: The OpenIndiana buildbot was bit by a rounding error. How do we have rounding issue with only integers? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127

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

2012-05-03 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: We don't! The test that failed compares the ns_[amc]time and ns_[amc]time_ns fields to ensure they're roughly equivalent. Note that the former fields are floats, which by now ought not to be news to you. --

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

2012-05-03 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/3388/steps/test/logs/stdio ERROR: test_copy2_symlinks (test.test_shutil.TestShutil) --

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

2012-05-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cdc4e0f8135d by Larry Hastings in branch 'default': Issue #14127: Fix no-op stub for platforms that lack some os functions. http://hg.python.org/cpython/rev/cdc4e0f8135d --

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

2012-05-03 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: bba131e48852 causes crashes on Windows. The attached patch fixes the crash and makes test_os pass for me. However, using PyErr_ExceptionMatches(PyExc_RuntimeError) to check whether to try again using narrow strings is ugly. Maybe

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

2012-04-29 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Failure on x86 OpenIndiana 3.x: FAIL: test_stat_attributes (test.test_os.StatAttributeTests) -- Traceback (most recent call last): File

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

2012-04-26 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Anybody else? I guess I'm gonna jst miss Alpha 3, but if nobody has any other objections I'll check this in today (Thursday). If you want me to hold off just let me know. -- ___ Python

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

2012-04-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds - add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*()

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

2012-04-26 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: FYI, Martin was replying to Guido's comment from more than a month ago, when I posted revision #2 of my first patch series. By sheer coincidence I posted revision #2 of a new patch series yesterday. But Reitveld worked fine for that!

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

2012-04-24 Thread Larry Hastings
Larry Hastings la...@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

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

2012-04-24 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: I removed futimens because it's now extraneous. futimens() has nice feature: it is possible to only update atime only update mtime, or use now as the new atime and/or mtime. 3882 If *_nsec is specified as UTIME_NOW, the

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

2012-04-24 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: futimens() has nice feature: it is possible to only update atime only update mtime, or use now as the new atime and/or mtime. YAGNI. Worst case, you can use call futimes twice, once with no args, then fstat() it to get the current-ish

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

2012-04-24 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Second round of my patch, incorporating nearly all of Victor's suggestions. Thanks, Victor! -- Added file: http://bugs.python.org/file25356/larry.utime.ns.2.patch ___ Python tracker

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

2012-04-19 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Sorry about the delay; laptop died, finally dealt with reviving the data off it. Also: fixed spelling error in title. -- title: add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of