mplanchard / falcon-marshmallow

Marshmallow serialization/deserialization middleware for Falcon
MIT License
4 stars 2 forks source link

Marshmallow 3 Compatibility #8

Closed mplanchard closed 5 years ago

mplanchard commented 5 years ago

Resolves #7 and ihiji/falcon-marshmallow#18

Marshmallow 3 changed the return signature of schema.load and schema.dump operations, returning only the parsed data, and raising a ValidationError in the event of issues. This updates to fork the code depending on the marshmallow version, and to handle each branch appropriately.

There were also some minor updates to the Falcon test client that required updates to the tests. I have also done some autoformatting with black --line-length=80.

Tests have been updated to run against marshmallow versions 2 and 3 for platforms that support both, and this bumps the version to 0.3.0.