[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-14 Thread Ned Deily
Ned Deily added the comment: Committed for release in 3.4.0. Thanks, Mark. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset bfd53dcb02ff by Ned Deily in branch 'default': Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache. http://hg.python.org/cpython/rev/bfd53dcb02ff -- nosy: +python-dev ___ Python tr

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-13 Thread Mark Levitt
Mark Levitt added the comment: Cool. I've gone ahead and generated a new patch with the version added directive included. -- Added file: http://bugs.python.org/file30571/18149-3.patch ___ Python tracker __

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Ned Deily
Ned Deily added the comment: Looks good to me, other than that the doc change should include a version added directive (which can be added by the committer): .. function:: clear_cache() + .. versionadded:: 3.4 + Clear the filecmp cache. This may be useful if a file is compared so quickl

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Mark Levitt
Mark Levitt added the comment: Ned, Thanks for taking the time to review. I've updated the docs, added a unit test, signed the contributor form, and made the changes/corrections from your review. Updated patch attached. -- Added file: http://bugs.python.org/file30565/18149-2.patch __

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch, Mark. I've left some review comments via Rietveld (the review link next to the patch). Also, if you haven't already, please fill out the contributor form as described in the Developer's Guide (http://docs.python.org/devguide/patch.html#licens

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Mark Levitt
Mark Levitt added the comment: I've added a "clear_cache()" method to filecmp.py. Patch attached. I had thought about implementing an optional parameter to only invalidate the cache of a specific file object, but figured I'd keep it simple for now. First time submitting a patch, so apologies

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for a cache clearing function like the one in re.py -- ___ Python tracker ___ ___ Python-bugs-

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Ned Deily
Ned Deily added the comment: It seems like this would be a fairly rare situation and, as you note, dependent on the underlying file system. But it would be easy to add a new function to the module to clear its cache in cases where it is known this might be a problem. In fact, in Issue11802 a