Repository navigation
Conversation
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.
Summary
XML responses with uppercase or mixed-case media types currently bypass the XML formatter, for example
APPLICATION/XMLandApplication/Atom+XML. Compare the media type case-insensitively so these responses receive the same formatting as their lowercase equivalents.The patch changes only the formatter check and adds CLI-entry regression coverage, a documentation note and a changelog entry.
Validation
Both new regressions fail on unchanged upstream and pass with this patch.
python -m pytest tests/test_xml.py tests/test_output.py: 140 passed, 3 xfailed (27 warnings).Changed-file Flake8 and
git diff --checkpass.Tested on Windows with Python 3.12.
Prepared and tested with OpenAI Codex assistance.
Remote CI
Code style and Markdown checks have passed. The Ubuntu/Python 3.7 jobs fail in
actions/setup-pythonbefore dependencies or tests run: Python 3.7 is unavailable for Ubuntu 24.04. Other matrix jobs were still running at this check; this is not a claim that the full CI passed.CI failure investigation (2026-10-06)
Code style and Markdown checks passed. The XML regression tests also passed in CI. The failing checks include pre-existing Big5 charset detection, argparse help text, pyOpenSSL digest authentication, and Windows plugin tests. The master branch already reports the same failures in its 2026-08-29 test run, before this contribution. Compare master Ubuntu 3.12, master pyOpenSSL, and master Windows plugin failures.
For an additional controlled local check, I ran the same 76 encoding, CLI UI, and XML tests with the original XML formatter and with this patch, using unchanged test files and dependencies (Windows, Python 3.12): original formatter: 71 passed, 5 failed; patched formatter: 73 passed, 3 failed. The two XML regressions are the only failures resolved by this patch; both Big5 failures and the help-text failure remain unchanged.
Ubuntu/Python 3.7 fails during setup because that interpreter is unavailable on Ubuntu 24.04. macOS jobs are still queued as of this check. Coverage fails because its test run reports the same two Big5 failures (1019 tests passed); it does not reach a successful coverage result. No unrelated CI or dependency changes have been added to this XML fix.