HomeSoftware Heritage

model: Fix hypothesis integration with attr < 21.3.0

Description

model: Fix hypothesis integration with attr < 21.3.0

When using attr < 21.3.0, adding field transformer breaks attrs
integration with hypothesis, because attributes transformed with
such function are not casted to generated AttrsClass, but remains
just an list of attributes. This causes error in hypothesis by
raising an AttributeError.

As we use attr 21.2.0 in production and when building debian buster
package, add a workaround for that issue as explained here:
https://github.com/python-attrs/attrs/issues/821.

Details

Provenance
anlambertAuthored on Oct 17 2022, 5:22 PM
anlambertPushed on Oct 17 2022, 7:05 PM
Differential Revision
D8688: model: Fix hypothesis integration with attr < 21.3.0
Parents
rDMOD13e7adc3e854: merkle: Make MerkleNode.collect return a set of nodes instead of a dict
Branches
Unknown
Tags
Unknown
References
tag: v6.6.0
Build Status
Buildable 32340
Build 50652: test-and-buildJenkins console · Jenkins