-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-2680 Breaking changes to DBRef BSON+JSON decoding #722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng JSON Skip UUID hyphens test.
…g TODO: C extensions PYTHON-2841 resync bson corpus tests
a094215
to
ec2ab33
Compare
@@ -202,7 +202,10 @@ def _get_object(data, view, position, obj_end, opts, dummy): | |||
obj = _elements_to_dict(data, view, position + 4, end, opts) | |||
|
|||
position += obj_size | |||
if "$ref" in obj: | |||
# If DBRef validation fails, return a normal doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the breaking DBRef BSON decoding change.
if "$ref" in dct: | ||
if (isinstance(dct.get('$ref'), str) and | ||
"$id" in dct and | ||
isinstance(dct.get('$db'), (str, type(None)))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the breaking DBRef JSON decoding change.
@juliusgeo I've merged this without waiting for your review but please take a look through this change anyway. Feel free to ask any questions you might have. |
Implement DBRef spec version 1.0 tests.
Still TODO: