-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PYTHON-3668 Use polling SDAM mode on FaaS and add sdamMode=auto/stream/poll #1360
Conversation
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.
LGTM!
I'd say let's wait for consensus on mongodb/specifications#1452, and defer this to 4.6. |
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.
One minor typing comment.
pymongo/common.py
Outdated
@@ -669,6 +672,16 @@ def validate_datetime_conversion(option: Any, value: Any) -> Optional[DatetimeCo | |||
raise TypeError(f"{option} must be a str or int representing DatetimeConversion") | |||
|
|||
|
|||
def validate_sdam_mode(option: Any, value: Any) -> str: |
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.
Is value
annotated as Any
for consistency with other validation methods? We're explicitly checking that value
is one of three specific strings, which suggests it should be annotated as such.
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.
Good call. Done.
I opened https://jira.mongodb.org/browse/PYTHON-3994 to track the docs failure. |
https://jira.mongodb.org/browse/PYTHON-3668
The implementation of mongodb/specifications#1452.