-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5543 PyMongoBaseProtocol should inherit from asyncio.BaseProtocol #2528
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
- Import and use BaseProtocol instead of Protocal in PyMongoBaseProtocoal implementation. Resolves issue with instance type check in uvloop that prevents correct buffered config from being set.
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.
Can you change the title of the PR to reflect the change better? Something like "PyMongoBaseProtocol should inherit from asyncio.BaseProtocol".
doc/changelog.rst
Outdated
Version 4.15.1 is a bug fix release. | ||
|
||
- Fixed a bug in ``MongoClient.network_layer`` and ``AsyncMongoClient.network_layer`` | ||
that could cause an ``TimeoutError`` when connecting to servers. |
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.
We don't need to call out that the bug was in network_layer
. We do need to call out that it was a bug with AsyncMongoClient
, and only with uvicorn
and uvloop
.
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.
OK I'll fix, what about the difference between PYTHON-5543 and PYTHON-5544? I couldn't reproduce for PYTHON-5543 because the reproducer was incomplete. Should we assume some use of uvicorn
with FastAPI?
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.
I closed PYTHON-5543 as a duplicate. Let me know if that's incorrect.
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.
uvicorn
defaults to uvloop
under the hood.
drivers-pr-bot please backport to v4.15 |
Co-authored-by: Noah Stapp <noah@noahstapp.com>
…col (mongodb#2528) Co-authored-by: Noah Stapp <noah@noahstapp.com>
…col (mongodb#2528) Co-authored-by: Noah Stapp <noah@noahstapp.com>
BaseProtocol
instead ofProtocol
inPyMongoBaseProtocol
implementation added in PYTHON-5215.