Skip to content

DOCSP-46685: BSON #159

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, 2025
Merged

DOCSP-46685: BSON #159

merged 5 commits into from
Feb 3, 2025

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Jan 30, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-46685

Staging Links

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for docs-pymongo ready!

Name Link
🔨 Latest commit 418c14f
🔍 Latest deploy log https://app.netlify.com/sites/docs-pymongo/deploys/679d2176477ce10008f51d56
😎 Deploy Preview https://deploy-preview-159--docs-pymongo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@rachel-mack rachel-mack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor suggestions:

Copy link

@caseyclements caseyclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

import bson

with open("file.bson", "w") as file:
file.write(BSON.encode(document))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bson.encode(document) not BSON.encode()


with open("file.bson", "rb") as file:
data = file.read()
document = BSON(data).decode()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use bson.decode(data) not BSON.decode()

@mcmorisi mcmorisi requested a review from ShaneHarvey January 31, 2025 19:17
@mcmorisi mcmorisi merged commit 11167f1 into mongodb:master Feb 3, 2025
5 of 6 checks passed
@mcmorisi mcmorisi deleted the DOCSP-46685-bson branch February 3, 2025 15:48
mcmorisi added a commit that referenced this pull request Feb 3, 2025
(cherry picked from commit 11167f1)
mcmorisi added a commit that referenced this pull request Feb 3, 2025
(cherry picked from commit 11167f1)
mcmorisi added a commit that referenced this pull request Feb 3, 2025
(cherry picked from commit 11167f1)
mcmorisi added a commit that referenced this pull request Feb 3, 2025
(cherry picked from commit 11167f1)
mcmorisi added a commit that referenced this pull request Feb 3, 2025
(cherry picked from commit 11167f1)
mongoKart pushed a commit to mongoKart/docs-pymongo that referenced this pull request Feb 6, 2025
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.

4 participants