Skip to content

PYTHON-5344 Allow Instantiated MongoClients to Send Client Metadata On-Demand #2358

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

sleepyStick
Copy link
Contributor

@sleepyStick sleepyStick commented Jun 2, 2025

https://jira.mongodb.org/browse/PYTHON-5344
https://jira.mongodb.org/browse/PYTHON-5403

Notes:

  • I used mockupDB to capture the metadata that the client sends in the handshake
  • i put the tests in the normal tests folder (as opposed to the test/mockupdb) to utilize synchro for the async -> sync tests.

@@ -1040,6 +1041,20 @@ async def target() -> bool:
self._kill_cursors_executor = executor
self._opened = False

def _append_metadata(self, driver_info: DriverInfo) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be public: "Specifies that drivers MUST provide an API to allow updating client metadata (name, version, platform) after initialization"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh good catch!

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