Skip to content

[xmltodict] parse() can return None in streaming mode; fix callback types - #16829

Open
hemtilva wants to merge 3 commits into
python:mainfrom
hemtilva:xmltodict-parse-streaming-callbacks
Open

hemtilva wants to merge 3 commits into
python:mainfrom
hemtilva:xmltodict-parse-streaming-callbacks

Conversation

@hemtilva

Copy link
Copy Markdown
Contributor

Fixes #16827

parse() returns dict[str, Any] for item_depth=0 and dict[str, Any] | None otherwise, and the force_list/force_cdata callback types now match what xmltodict passes. I left postprocessor alone since #16616 covers it. Added @tests/test_cases/check_parse.py.

I used Claude to help with this.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
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.

[xmltodict] parse() returns None in streaming mode; force_list/force_cdata callback types are wrong

2 participants