Remove the separate async parser class for v9.0#1033
Merged
sirosen merged 1 commit intomarshmallow-code:devfrom Feb 3, 2026
Merged
Remove the separate async parser class for v9.0#1033sirosen merged 1 commit intomarshmallow-code:devfrom
sirosen merged 1 commit intomarshmallow-code:devfrom
Conversation
The separate AsyncParser class is no longer needed, as async parsing is now handled by the main Parser class. This transition was achieved during 8.x versions and therefore AsyncParser had to remain as a shim which replaces `parse` (the sync function on the base class) with a call to the async variant, `async_parse`. A battery of tests with called `await parser.parse(...)` on an async parser are trivially updated to `await parser.async_parse(...)`, but no other changes are needed.
lafrech
approved these changes
Jan 31, 2026
Member
lafrech
left a comment
There was a problem hiding this comment.
I agree with the intent. Thanks for the cleanup.
I'm happy doing this in v9.
Not sure it is worth the deprecation notice but if we want to do that we can deprecate in v8.x.
sloria
approved these changes
Feb 3, 2026
Collaborator
Author
I think let's not bother. Most users would be unaffected, and it's possible to swap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This took a while for me to open as a PR, but it's been on my radar for a long time as a change I wanted to make for the next major version.
Because webargs has been so stable, it hasn't been a priority.
@lafrech, @sloria, I'm open to discussing it more -- I care more about the conceptual cleanup than any maintenance burden we carry.
AsyncParseris very small and doesn't cost much to keep.It could remain but raise a deprecation warning on init in v9.x , and we'd wait for our next major to eventually drop it.
The separate AsyncParser class is no longer needed, as async parsing is
now handled by the main Parser class. This transition was achieved during
8.x versions and therefore AsyncParser had to remain as a shim which
replaces
parse(the sync function on the base class) with a call to theasync variant,
async_parse.A battery of tests with called
await parser.parse(...)on an asyncparser are trivially updated to
await parser.async_parse(...), but noother changes are needed.