File tree Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -159,32 +159,15 @@ on `greenlets <https://pypi.org/project/greenlet/>`__ instead of threads.
159159
160160To use gevent with {+driver-short+}, call gevent's
161161``monkey.patch_all()`` method *before* loading any other modules, as shown in the following
162- example. Select the :guilabel:`Synchronous` or :guilabel:`Asynchronous` tab to see the
163- corresponding code:
162+ example:
164163
165- .. tabs::
166-
167- .. tab:: Synchronous
168- :tabid: sync
169-
170- .. code-block:: python
171-
172- # You must call patch_all() *before* importing any other modules
173- from gevent import monkey
174- _ = monkey.patch_all()
175- from pymongo import MongoClient
176- client = MongoClient()
177-
178- .. tab:: Asynchronous
179- :tabid: async
180-
181- .. code-block:: python
164+ .. code-block:: python
182165
183- # You must call patch_all() *before* importing any other modules
184- from gevent import monkey
185- _ = monkey.patch_all()
186- from pymongo import AsyncMongoClient
187- client = AsyncMongoClient()
166+ # You must call patch_all() *before* importing any other modules
167+ from gevent import monkey
168+ _ = monkey.patch_all()
169+ from pymongo import MongoClient
170+ client = MongoClient()
188171
189172.. important:: Close MongoClient to Avoid Blocking
190173
You can’t perform that action at this time.
0 commit comments