Skip to content

Support marshmallow 4 - #64

Merged
jgoclawski merged 3 commits into
masterfrom
marshmallow-4
Nov 16, 2026
Merged

jgoclawski merged 3 commits into
masterfrom
marshmallow-4

Conversation

@riklaunim

@riklaunim riklaunim commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bump marshmallow to >=4.0.0 and switch from marshmallow_jsonapi to marshmallow-jsonapi-minfork.
  • Catch TypeError in ResourceList.get / ResourceDetail.get: marshmallow 4's DateTime serialization raises TypeError (instead of AttributeError) on invalid data, which previously escaped and produced Flask's HTML 500 page instead of a JSON:API error.
  • Relax test_bad_data_get_list / test_bad_data_get_detail to not depend on the exact exception message.
  • Add changelog entries and bump the next release to 1.5.0 (1.5.0.dev0), since requiring marshmallow 4 and swapping the jsonapi package may break existing users.

Test plan

  • pytest . with marshmallow 4.3.1, marshmallow-jsonapi-minfork 0.26.0, Flask 3.1.3, SQLAlchemy 2.1.6 on Python 3.14: 135 passed.

🤖 Generated with Claude Code

riklaunim and others added 3 commits October 26, 2026 12:26
Switch to marshmallow>=4.0.0 and marshmallow-jsonapi-minfork. Marshmallow 4
raises TypeError instead of AttributeError when serializing invalid data,
so catch TypeError in resource GET handlers to keep returning JSON:API errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jgoclawski jgoclawski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jgoclawski
jgoclawski merged commit 93f869e into master Nov 16, 2026
4 checks passed
@jgoclawski
jgoclawski deleted the marshmallow-4 branch November 16, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants