[issue13327] Update utime API to not require explicit None argument

2011-11-08 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8907d646e0df by Jesus Cea in branch 'default':
Commit 59dca1e2363d for issue #13327 introduced a compilation warning
http://hg.python.org/cpython/rev/8907d646e0df

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 5e18ff5476e8 by Brian Curtin in branch 'default':
News updates for #13327.
http://hg.python.org/cpython/rev/5e18ff5476e8

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-07 Thread Brian Curtin

Brian Curtin  added the comment:

Changeset 045e8757f10d was also entered for this, which should conclude the 
changes. Everything seems to have survived the buildbots for now, so closing as 
fixed. Feel free to reopen if there are any other issues.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 59dca1e2363d by Brian Curtin in branch 'default':
Fix #13327. utimensat now has the atime and mtime arguments set as optional,
http://hg.python.org/cpython/rev/59dca1e2363d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 99e118951a80 by Brian Curtin in branch 'default':
Fix #13327. Remove the need for an explicit None as the second argument to
http://hg.python.org/cpython/rev/99e118951a80

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

+1 to the optional parameter.

--
nosy: +jcea

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The `delta` keyword would actually be better than `places`, especially
> on the slower buildbots. delta=10 would allow up to 10 seconds between
> those utime calls. Is that being too permissive?

I think it's ok. We don't have to test the system's utime
implementation, just that the second parameter does what it should.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

+1 on making the second arg optional.

--
nosy: +petri.lehtinen

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Brian Curtin

Brian Curtin  added the comment:

The `delta` keyword would actually be better than `places`, especially on the 
slower buildbots. delta=10 would allow up to 10 seconds between those utime 
calls. Is that being too permissive?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I would specify an even smaller "places". We have very slow buildbots.
You could first call utime() with a date far away in the past if you want.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Brian Curtin

Brian Curtin  added the comment:

Ah, yes. Would the following work better for the last line?

self.assertAlmostEqual(st1.st_mtime, st2.st_mtime, places=2)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You have a possible failure here: 

+# Set to the current time in the old explicit way.
+os.utime(support.TESTFN, None)
+st1 = os.stat(support.TESTFN)
+# Set to the current time in the new way
+os.utime(support.TESTFN)
+st2 = os.stat(support.TESTFN)
+self.assertEqual(st1.st_mtime, st2.st_mtime)

I managed to trigger it after a run of tests:

==
FAIL: test_utime_noargs (test.test_os.StatAttributeTests)
--
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/test/test_os.py", line 286, in 
test_utime_noargs
self.assertEqual(st1.st_mtime, st2.st_mtime)
AssertionError: 1320285959.712339 != 1320285959.7133389


Otherwise, +1.

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Brian Curtin

New submission from Brian Curtin :

os.utime currently requires an explicit `None` as the second argument in order 
to update to the current time. Other APIs would just have the second argument 
as optional in this case, operating with one argument.

Attached is a patch which changes the second argument to accept the time tuple, 
`None`, or literally nothing. Tested on Windows and Mac.

If this is acceptable, I'll make the same change for futimes, lutimes, and 
futimens.

--
assignee: brian.curtin
components: Library (Lib)
files: utime.diff
keywords: needs review, patch
messages: 146884
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: Update utime API to not require explicit None argument
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file23600/utime.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com