colander icon indicating copy to clipboard operation
colander copied to clipboard

"Invalid" check for Mappings

Open romuald opened this issue 8 years ago • 0 comments

Small issue with dict-like mappings

In the Mapping _validate method

Colander is checking if there is an "items" attribute

However python (2) checks if there is a keys attribute instead : https://github.com/python/cpython/blob/2.7/Objects/dictobject.c#L1475


Note that fixing by replacing items by keys this might break some existing validation. I'm just submitting this as a possible issue (maybe simply try to use dict(value)?)

romuald avatar Apr 04 '16 16:04 romuald