Repository navigation
Conversation
The $maxKey value check passed the doc as a second TypeError argument instead of formatting it, and the extra-field check said $minKey. Format both like the $minKey parser does and add a test. Assisted-by: Claude
Contributor
|
Thanks @techi101 ! We are tracking this here: https://jira.mongodb.org/browse/PYTHON-6237 |
aclark4life
approved these changes
Nov 13, 2026
This branch has not been deployed
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.
PYTHON-6237
Changes in this PR
The
$maxKeyparser inbson/json_util.pypassed the doc as a second argument toTypeErrorinstead of formatting it, so the error showed a raw tuple:Its extra-field error also said
Bad $minKey. Both now use f-strings, matching the$minKeyparser right above it:I used Claude to help find this, and I reviewed and tested the change myself.
Test Plan
Added
test_minkey_maxkey_errorsintest/test_json_util.py, which checks both error messages for$minKeyand$maxKey. Ranpytest test/test_json_util.py: 28 passed.Checklist
Checklist for Author
Checklist for Reviewer