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 Steven.Barker
Recipients Andrew.Kubera, Steven.Barker, chris.jerdonek, fdrake, georg.brandl, goatsofmendez, pvrijlandt, rhettinger, sandro.tosi
Date 2014-08-03.23:52:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407109937.11.0.881891838879.issue1234674@psf.upfronthosting.co.za>
In-reply-to
Content
I've worked on this filecmp issue some more, and I have some new patches.

First up is a patch that only modifies the tests. It has one test that fails without the behavior patch. The test patch also modifies some other tests so that they will work after the behavior patch is applied. Notably, test_keyword had a some tests that would fail due to false negatives on shallow comparisons.

The second patch is the behavior and documentation changes required to actually fix this issue. This should be very simple to understand (the behavior change is only two lines of code, quoted in the discussion above). If you apply only this patch, you'll get several test failures, all due to false negative shallow comparisons (where two files have the same contents, but their stat signatures differ).

With these new patches, I think this issue is ready for a review, and eventually to be committed. The behavior change is simple and I think, obviously correct (assuming we want to risk breaking backwards compatibility). Perhaps my test code can be improved, but I don't think it's too bad.

So, the main question is "will too much outside code break if we make this behavior change?"

I don't think filecmp is used very widely, but as was demonstrated by the standard library's only use of filecmp (in Lib/test/test_keyword.py), it's likely that a lot of users perform shallow comparisons (by default) where they really don't want to get false-negatives. If we decide that the changed behavior is too big of a break of backwards compatibility, we just need to document the current behavior better (at a minimum, the docstring for filecmp.cmp must be corrected).
History
Date User Action Args
2014-08-03 23:52:17Steven.Barkersetrecipients: + Steven.Barker, fdrake, georg.brandl, rhettinger, pvrijlandt, goatsofmendez, sandro.tosi, chris.jerdonek, Andrew.Kubera
2014-08-03 23:52:17Steven.Barkersetmessageid: <1407109937.11.0.881891838879.issue1234674@psf.upfronthosting.co.za>
2014-08-03 23:52:17Steven.Barkerlinkissue1234674 messages
2014-08-03 23:52:16Steven.Barkercreate