-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-3075 [Backport-3.13] bulk_write does not apply CodecOptions to upserted_ids result #842
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
evergreen patch |
test/test_bulk.py
Outdated
options = CodecOptions(uuid_representation=UuidRepresentation.STANDARD) | ||
coll = self.coll.with_options(codec_options=options) | ||
ids = [ | ||
{'f': Binary(bytes(i)), 'f2': uuid.uuid4()} |
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 test runs into a bytes/binary issue on python 2. Is there any point of using 'f': Binary(bytes(i))
? What if we just did 'f': i
?
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.
Done
@@ -27,7 +27,7 @@ | |||
HAS_SNI as _HAVE_SNI, | |||
IPADDR_SAFE as _IPADDR_SAFE) | |||
|
|||
from bson import DEFAULT_CODEC_OPTIONS | |||
from bson import DEFAULT_CODEC_OPTIONS, codec_options |
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.
Importing codec_options is not needed. Is your editor adding this automatically by accident?
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.
Yeah, I just disabled it
Encryption job is passing. |
No description provided.