Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOTOR-209 Wrap ClientSession in Motor class
In Motor 1.2 we supported logical sessions using the ClientSession class from PyMongo - there was no need to wrap it because it does no I/O and has no async methods of its own. Now, closing a session that is in a transaction sends a command that commits or aborts the transaction, and the application must await the outcome. Therefore, I wrap ClientSession in a new MotorClientSession class and apps must use it in "async with" instead of "with". This incompatible change motivates Motor 2.0.
- Loading branch information
Showing
20 changed files
with
341 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:class:`~motor.motor_asyncio.AsyncIOMotorClientSession` -- Sequence of operations | ||
================================================================================= | ||
|
||
.. autoclass:: motor.motor_asyncio.AsyncIOMotorClientSession | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
:class:`~motor.motor_tornado.MotorClientSession` -- Sequence of operations | ||
========================================================================== | ||
|
||
.. currentmodule:: motor.motor_tornado | ||
|
||
.. autoclass:: motor.motor_tornado.MotorClientSession | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.