FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

filecmp.dircmp does not allow non-shallow comparisons · Issue #57141 · python/cpython · GitHub

Repository navigation

filecmp.dircmp does not allow non-shallow comparisons #57141

Closed

Description

mannequin
BPO 12932
Nosy @terryjreedy, @rbtcollins, @merwok, @regebro, @mitar, @cjerdonek
Files
  • issue12932.diff: Add input parameter 'shallow' to dircmp.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2011-09-07.16:01:35.750>
    labels = ['type-feature', 'library']
    title = 'filecmp.dircmp does not allow non-shallow comparisons'
    updated_at = <Date 2018-01-03.09:42:28.161>
    user = 'https://bugs.python.org/kesmit'

    bugs.python.org fields:

    activity = <Date 2018-01-03.09:42:28.161>
    actor = 'mitar'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2011-09-07.16:01:35.750>
    creator = 'kesmit'
    dependencies = []
    files = ['30589']
    hgrepos = []
    issue_num = 12932
    keywords = ['patch']
    message_count = 9.0
    messages = ['143692', '156736', '160966', '161823', '164648', '166246', '191154', '247695', '247696']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'rbcollins', 'eric.araujo', 'lregebro', 'mitar', 'chris.jerdonek', 'planet36', 'kesmit']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue12932'
    versions = ['Python 3.6']

    Linked PRs

    Activity

    1. kesmit commented on Sep 7, 2011

      kesmitmannequin
      MannequinAuthor

      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
    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Sep 7, 2011
    3. merwok commented on Mar 25, 2012

      Member

      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.

    4. regebro commented on May 17, 2012

      regebromannequin
      Mannequin

      filecmp is still there in Python 3.3 Alpha 3. I can't find any reference to it being deprecated.

    5. terryjreedy commented on May 29, 2012

      Member

      Lennart, I saw your response on StackOverflow ;-).

    6. changed the title [-]dircmp does not allow non-shallow comparisons[/-] [+]filecmp.dircmp does not allow non-shallow comparisons[/+] on Jun 1, 2012
    7. cjerdonek commented on Jul 4, 2012

      Member

      +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 bpo-15250 for this.

    8. cjerdonek commented on Jul 23, 2012

      Member

      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).

    9. planet36 commented on Jun 14, 2013

      planet36mannequin
      Mannequin

      Add input parameter 'shallow' to dircmp.
      Use it in phase3 and phase4.
      Document it in filecmp.rst.

      Did not modify test_filecmp.py.

    10. rbtcollins commented on Jul 30, 2015

      Member

      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.

    11. rbtcollins commented on Jul 30, 2015

      Member

      Bah, wrong stage. patch review.

    12. transferred this issue fromon Apr 10, 2022
    13. 9 remaining items

    14. merwok commented on Mar 6, 2024

      Member

      Really wish github would send a notif on the issue when a PR is created to solve it!

    15. terryjreedy commented on Mar 7, 2024

      Member

      Not a bad idea. Did bpo do so? (I cannot remember either way for sure.)

      Given the absence of such notices, the PR author should have requested a review from you. If not already, the devguide should say something about looking for participants (preferably recent) who are members of 'Python' or 'python/core'. (bpo starred our names on comments.)

    16. added a commit that references this issue on Mar 25, 2024
    17. added a commit that references this issue on Apr 17, 2024
    18. JelleZijlstra commented on Jul 13, 2024

      Member

      Should the new parameter be made keyword-only? I feel we usually do that for newly added optional parameters. We have a little bit of time left before the RC phase to change this.

    19. added a commit that references this issue on Jul 14, 2024
    20. JelleZijlstra commented on Jul 14, 2024

      Member

      Submitted #121767 to make the new parameter keyword-only.

    21. added a commit that references this issue on Jul 14, 2024
    22. added a commit that references this issue on Jul 14, 2024
    23. added a commit that references this issue on Jul 14, 2024
    24. added a commit that references this issue on Jul 17, 2024
    25. ZeroIntensity commented on Jan 11, 2025

      Member

      It looks like everything is done here, for real this time!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions


        Back | FazBrowse Home | New Git URL