python-tuf/tuf
Martin Vrachev 6ea5372edb Take order into account for certain cases
After we have dropped OrderedDict in e3b267e2e0
we are relying on python3.7+ default behavior to preserve the insertion
order, but there is one caveat.
When comparing dictionaries the order is still irrelevant compared to
OrderedDict. For example:
>>> OrderedDict([(1,1), (2,2)]) == OrderedDict([(2,2), (1,1)])
False
>>> dict([(1,1), (2,2)]) == dict([(2,2), (1,1)])
True

There are two special attributes, defined in the specification, where
the order makes a difference when comparing two objects:
- Metadata.signatures
- Targets.delegations.roles.
We want to make sure that the order in those two cases makes a
difference when comparing two objects and that's why those changes
are required inside two __eq__ implementations.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2022-02-28 14:42:06 +02:00
..
api Take order into account for certain cases 2022-02-28 14:42:06 +02:00
ngclient Fix line lengths in ngclient docstrings 2022-02-11 15:33:48 +02:00
__init__.py python-tuf version 1.0.0 \o/ 2022-02-18 15:24:33 +02:00
py.typed Advertize type annotations with py.typed 2021-11-11 22:34:22 +02:00