msg143692 - (view) |
Author: Kevin Smith (kesmit) |
Date: 2011-09-07 16:01 |
While filecmp.cmp and filecmp.cmpfiles allow a shallow option to be specified to invoke a more involved comparison of files, filecmp.dircmp does not. It is limited to shallow-only comparisons. This could be solved quite easily by adding a shallow keyword option to dircmp then changing the phase3 method to the following. def phase3(self): # Find out differences between common files xx = cmpfiles(self.left, self.right, self.common_files, self.shallow) self.same_files, self.diff_files, self.funny_files = xx |
|
|
msg156736 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-03-25 06:59 |
Thanks for the report. Unfortunately 2.7 is closed to new features and the module is removed in 3.x, so there is nothing to do here. |
|
|
msg160966 - (view) |
Author: Lennart Regebro (lregebro) |
Date: 2012-05-17 12:05 |
filecmp is still there in Python 3.3 Alpha 3. I can't find any reference to it being deprecated. |
|
|
msg161823 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2012-05-29 00:34 |
Lennart, I saw your response on StackOverflow ;-). |
|
|
msg164648 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-07-04 14:41 |
+1 for this. Whether or not this feature is implemented, I think the documentation should state that directory comparisons are done using "shallow=True". I created issue 15250 for this. |
|
|
msg166246 - (view) |
Author: Chris Jerdonek (chris.jerdonek) *  |
Date: 2012-07-23 19:55 |
Allowing dircmp() to accept a file comparison function is another option to consider that may address more needs going forward. shallow=False could be achieved by passing lambda a, b: filecmp.cmp(a, b, shallow=False). |
|
|
msg191154 - (view) |
Author: Steve Ward (planet36) |
Date: 2013-06-14 21:24 |
Add input parameter 'shallow' to dircmp. Use it in phase3 and phase4. Document it in filecmp.rst. Did not modify test_filecmp.py. |
|
|
msg247695 - (view) |
Author: Robert Collins (rbcollins) *  |
Date: 2015-07-30 20:50 |
Thanks for the patch @planet36, however I think this is sufficiently large a change that we should also have a test case for it. I'm also retargeting this to the current open branches for feature work - 3.6. |
|
|
msg247696 - (view) |
Author: Robert Collins (rbcollins) *  |
Date: 2015-07-30 20:51 |
Bah, wrong stage. patch review. |
|
|