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 larry
Recipients Arfrever, larry, pitrou, skrah, trent
Date 2012-10-17.04:38:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350448696.66.0.285548158717.issue15745@psf.upfronthosting.co.za>
In-reply-to
Content
You're a sneaky, naughty bunny.  "posix._have_functions" indeed!  I guess your back was to the wall.

1)
If I follow your code correctly, when one has utimensat, the assertLess calls using _t consider st0.st_mtime_ns < st1.st_mtime_ns even if the left operand is (2e18-1) greater than the right.  It divides both operands by 1e9, then checks whether their delta is < 2e9.  In nanoseconds, 2e18-1 is roughly 63.5 years.  The case where one doesn't have utimensat but do have utimens is similarly generous.  Little wonder the test now passes!  Could you narrow down the range a little?

2)
I'd prefer if you amended the comment rather than remove it, perhaps adding

# (assuming your read and write functions both take the same units,
# which isn't true on all platforms--some Solaris and FreeBSD versions
# can read ns time but can only write ms time)

3)
Could you please find better names than "_t", "l", and "r"?

4)
In the future, please upload a patch as an attached file rather than as an inline comment.  This will permit me to use the bug tracker's built-in  Reitveld to examine the diff, which is more comfortable and permits inline comments.
History
Date User Action Args
2012-10-17 04:38:16larrysetrecipients: + larry, pitrou, trent, Arfrever, skrah
2012-10-17 04:38:16larrysetmessageid: <1350448696.66.0.285548158717.issue15745@psf.upfronthosting.co.za>
2012-10-17 04:38:16larrylinkissue15745 messages
2012-10-17 04:38:15larrycreate