Skip to content

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

Merged
merged 5 commits into from
Feb 3, 2022

Conversation

blink1073
Copy link
Member

No description provided.

@blink1073
Copy link
Member Author

evergreen patch

options = CodecOptions(uuid_representation=UuidRepresentation.STANDARD)
coll = self.coll.with_options(codec_options=options)
ids = [
{'f': Binary(bytes(i)), 'f2': uuid.uuid4()}
Copy link
Member

@ShaneHarvey ShaneHarvey Feb 2, 2022

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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

@blink1073
Copy link
Member Author

Encryption job is passing.

@blink1073 blink1073 requested a review from ShaneHarvey February 3, 2022 16:06
@blink1073 blink1073 merged commit 4c851aa into mongodb:v3.13 Feb 3, 2022
@blink1073 blink1073 deleted the PYTHON-3075-v3 branch February 3, 2022 20:22
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.

2 participants