Skip to content

"Invalid" check for Mappings #259

@romuald

Description

@romuald

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)?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions