Skip to content
Snippets Groups Projects

Make SWHID immutable and hashable.

Will be needed in the in-mem storage, as it will use SWHIDs as keys in a dict

Depends on !123 (closed) and !124 (closed).


Migrated from D3447 (view on Phabricator)

Merge request reports

Closed by Phabricator Migration userPhabricator Migration user 4 years ago (Jul 7, 2020 2:03pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Build is green

    Patch application report for D3447 (id=12212)

    Could not rebase; Attempt merge onto 9e475a70...

    Updating 9e475a7..bea256e
    Fast-forward
     swh/model/collections.py            | 12 ++++++-
     swh/model/identifiers.py            | 16 ++++++---
     swh/model/test_identifiers.py       | 72 +++++++++++++++++++++++++++++++++++++
     swh/model/tests/test_collections.py | 36 +++++++++++++++++++
     4 files changed, 130 insertions(+), 6 deletions(-)
     create mode 100644 swh/model/test_identifiers.py
    Changes applied before test
    commit bea256e39037ac31fd1d075845ccf2bc71d4cb35
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Tue Jul 7 15:12:44 2020 +0200
    
        Make SWHID immutable and hashable.
    
    commit 06837d5c877c6d06fc0fef193b80b1e2dc76691b
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Tue Jul 7 15:10:53 2020 +0200
    
        Implement ImmutableDict.__hash__.
    
    commit c4dad17f223d2300c7db187807ed74603a0e2002
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Tue Jul 7 15:04:54 2020 +0200
    
        Allow passing an ImmutableDict as argument to ImmutableDict's constructor.
        
        It allows easy conversion of Union[ImmutableDict, Dict] to ImmutableDict.

    See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/119/ for more details.

  • Merge request was accepted

  • Antoine Lambert approved this merge request

    approved this merge request

  • Author Maintainer

    Merge request was merged

  • closed

Please register or sign in to reply
Loading