As NamedTuple inherits from tuple, msgpack serializes it like a tuple,
which makes it indistinguishable from a tuple when deserializing,
which is an issue for the RPC API.
Details
Details
- Reviewers
douardda - Group Reviewers
Reviewers - Commits
- rDMOD52ef52ea46ac: Use attr instead of NamedTuple to generate SWHID.
Diff Detail
Diff Detail
- Repository
- rDMOD Data model
- Branch
- attr-swhid
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13445 Build 20564: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 20563: arc lint + arc unit
Event Timeline
Comment Actions
Build is green
Patch application report for D3450 (id=12225)
Rebasing onto bea256e390...
Current branch diff-target is up to date.
Changes applied before test
commit 52ef52ea46acbbf6622a172ff5fc8b9fa7d9cbd2 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Tue Jul 7 17:34:41 2020 +0200 Use attr instead of NamedTuple to generate SWHID. As NamedTuple inherits from tuple, msgpack serializes it like a tuple, which makes it indistinguishable from a tuple when deserializing, which is an issue for the RPC API.
See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/120/ for more details.
Comment Actions
Thx, looks good. Just a small question about the modification of the swhid() API.
swh/model/identifiers.py | ||
---|---|---|
754 | how is this (accept dict) related to the namedtuple->attr refactoring? |
swh/model/identifiers.py | ||
---|---|---|
754 | 07:53 <vlorentz> douardda: the reason is that we were already passing dicts |