diff --git a/README.md b/README.md index 4240d198..9cbc3aa2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ ![image](https://raw.github.com/mongodb/motor/master/doc/_static/motor.png) +> [!WARNING] +> Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. +> We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. +> To learn more, see the migration guide: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/reference/migration/. + ## About Motor is a full-featured, non-blocking [MongoDB](http://mongodb.org/) diff --git a/doc/api-asyncio/aiohttp.rst b/doc/api-asyncio/aiohttp.rst index 8e4c305d..adadf2be 100644 --- a/doc/api-asyncio/aiohttp.rst +++ b/doc/api-asyncio/aiohttp.rst @@ -1,6 +1,10 @@ :mod:`motor.aiohttp` - Integrate Motor with the aiohttp web framework ===================================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.aiohttp .. automodule:: motor.aiohttp diff --git a/doc/api-asyncio/asyncio_gridfs.rst b/doc/api-asyncio/asyncio_gridfs.rst index 28ca5f1f..f1d9bc42 100644 --- a/doc/api-asyncio/asyncio_gridfs.rst +++ b/doc/api-asyncio/asyncio_gridfs.rst @@ -1,6 +1,10 @@ asyncio GridFS Classes ====================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio Store blobs of data in `GridFS `_. diff --git a/doc/api-asyncio/asyncio_motor_change_stream.rst b/doc/api-asyncio/asyncio_motor_change_stream.rst index ba81f323..0cd30956 100644 --- a/doc/api-asyncio/asyncio_motor_change_stream.rst +++ b/doc/api-asyncio/asyncio_motor_change_stream.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorChangeStream` ====================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio .. autoclass:: AsyncIOMotorChangeStream diff --git a/doc/api-asyncio/asyncio_motor_client.rst b/doc/api-asyncio/asyncio_motor_client.rst index 375a7f76..b8fc9632 100644 --- a/doc/api-asyncio/asyncio_motor_client.rst +++ b/doc/api-asyncio/asyncio_motor_client.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorClient` -- Connection to MongoDB ========================================================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. autoclass:: motor.motor_asyncio.AsyncIOMotorClient :members: diff --git a/doc/api-asyncio/asyncio_motor_client_encryption.rst b/doc/api-asyncio/asyncio_motor_client_encryption.rst index 19c671af..4a6a9258 100644 --- a/doc/api-asyncio/asyncio_motor_client_encryption.rst +++ b/doc/api-asyncio/asyncio_motor_client_encryption.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorClientEncryption` ========================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio .. autoclass:: AsyncIOMotorClientEncryption diff --git a/doc/api-asyncio/asyncio_motor_client_session.rst b/doc/api-asyncio/asyncio_motor_client_session.rst index e99c126a..6be54f51 100644 --- a/doc/api-asyncio/asyncio_motor_client_session.rst +++ b/doc/api-asyncio/asyncio_motor_client_session.rst @@ -1,5 +1,9 @@ :class:`~motor.motor_asyncio.AsyncIOMotorClientSession` -- Sequence of operations ================================================================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. autoclass:: motor.motor_asyncio.AsyncIOMotorClientSession :members: diff --git a/doc/api-asyncio/asyncio_motor_collection.rst b/doc/api-asyncio/asyncio_motor_collection.rst index cddde0e2..9460cd39 100644 --- a/doc/api-asyncio/asyncio_motor_collection.rst +++ b/doc/api-asyncio/asyncio_motor_collection.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorCollection` ==================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio .. autoclass:: AsyncIOMotorCollection diff --git a/doc/api-asyncio/asyncio_motor_database.rst b/doc/api-asyncio/asyncio_motor_database.rst index 02a43d7e..c8bb7d8a 100644 --- a/doc/api-asyncio/asyncio_motor_database.rst +++ b/doc/api-asyncio/asyncio_motor_database.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorDatabase` ================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio .. autoclass:: AsyncIOMotorDatabase diff --git a/doc/api-asyncio/cursors.rst b/doc/api-asyncio/cursors.rst index 796e8cfb..ec0f8da8 100644 --- a/doc/api-asyncio/cursors.rst +++ b/doc/api-asyncio/cursors.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_asyncio.AsyncIOMotorCursor` ================================================ +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_asyncio .. autoclass:: AsyncIOMotorCursor diff --git a/doc/api-asyncio/index.rst b/doc/api-asyncio/index.rst index f4ad4c3d..c22fb108 100644 --- a/doc/api-asyncio/index.rst +++ b/doc/api-asyncio/index.rst @@ -1,6 +1,10 @@ Motor asyncio API ================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. toctree:: asyncio_motor_client diff --git a/doc/api-tornado/cursors.rst b/doc/api-tornado/cursors.rst index 9d136e0d..de5a9fae 100644 --- a/doc/api-tornado/cursors.rst +++ b/doc/api-tornado/cursors.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorCursor` ========================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorCursor diff --git a/doc/api-tornado/gridfs.rst b/doc/api-tornado/gridfs.rst index a83bcac0..342608e1 100644 --- a/doc/api-tornado/gridfs.rst +++ b/doc/api-tornado/gridfs.rst @@ -1,6 +1,10 @@ Motor GridFS Classes ==================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado Store blobs of data in `GridFS `_. diff --git a/doc/api-tornado/index.rst b/doc/api-tornado/index.rst index 038ba488..a9dea0b5 100644 --- a/doc/api-tornado/index.rst +++ b/doc/api-tornado/index.rst @@ -1,6 +1,10 @@ Motor Tornado API ================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. toctree:: motor_client diff --git a/doc/api-tornado/motor_change_stream.rst b/doc/api-tornado/motor_change_stream.rst index 25571864..9aa33395 100644 --- a/doc/api-tornado/motor_change_stream.rst +++ b/doc/api-tornado/motor_change_stream.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorChangeStream` =============================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorChangeStream diff --git a/doc/api-tornado/motor_client.rst b/doc/api-tornado/motor_client.rst index 1ebfacbb..878da84e 100644 --- a/doc/api-tornado/motor_client.rst +++ b/doc/api-tornado/motor_client.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorClient` -- Connection to MongoDB ================================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorClient diff --git a/doc/api-tornado/motor_client_encryption.rst b/doc/api-tornado/motor_client_encryption.rst index e6222681..e5ae62bd 100644 --- a/doc/api-tornado/motor_client_encryption.rst +++ b/doc/api-tornado/motor_client_encryption.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorClientEncryption` =================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorClientEncryption diff --git a/doc/api-tornado/motor_client_session.rst b/doc/api-tornado/motor_client_session.rst index 66b43d32..7c31b5ae 100644 --- a/doc/api-tornado/motor_client_session.rst +++ b/doc/api-tornado/motor_client_session.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorClientSession` -- Sequence of operations ========================================================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: motor.motor_tornado.MotorClientSession diff --git a/doc/api-tornado/motor_collection.rst b/doc/api-tornado/motor_collection.rst index d077c488..c9b1e456 100644 --- a/doc/api-tornado/motor_collection.rst +++ b/doc/api-tornado/motor_collection.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorCollection` ============================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorCollection diff --git a/doc/api-tornado/motor_database.rst b/doc/api-tornado/motor_database.rst index 41db522c..a32e4430 100644 --- a/doc/api-tornado/motor_database.rst +++ b/doc/api-tornado/motor_database.rst @@ -1,6 +1,10 @@ :class:`~motor.motor_tornado.MotorDatabase` =========================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.motor_tornado .. autoclass:: MotorDatabase diff --git a/doc/api-tornado/web.rst b/doc/api-tornado/web.rst index 622067ea..60624215 100644 --- a/doc/api-tornado/web.rst +++ b/doc/api-tornado/web.rst @@ -1,6 +1,10 @@ :mod:`motor.web` - Integrate Motor with the Tornado web framework ================================================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. currentmodule:: motor.web .. automodule:: motor.web diff --git a/doc/changelog.rst b/doc/changelog.rst index c77ab78e..d024b7fd 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + .. currentmodule:: motor.motor_tornado Motor 3.7.0 diff --git a/doc/configuration.rst b/doc/configuration.rst index 9605c854..5cb697e3 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1,6 +1,11 @@ Configuration ============= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + TLS Protocol Version '''''''''''''''''''' diff --git a/doc/developer-guide.rst b/doc/developer-guide.rst index d4a045f1..ebf0ae98 100644 --- a/doc/developer-guide.rst +++ b/doc/developer-guide.rst @@ -2,6 +2,11 @@ Developer Guide =============== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + Some explanations for those who would like to contribute to Motor development. Compatibility diff --git a/doc/differences.rst b/doc/differences.rst index 3e5a75e7..c992db18 100644 --- a/doc/differences.rst +++ b/doc/differences.rst @@ -4,6 +4,10 @@ Differences between Motor and PyMongo ===================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + .. important:: This page describes using Motor with Tornado. Beginning in version 0.5 Motor can also integrate with asyncio instead of Tornado. diff --git a/doc/features.rst b/doc/features.rst index d028254e..5449d5a4 100644 --- a/doc/features.rst +++ b/doc/features.rst @@ -4,6 +4,11 @@ Motor Features .. currentmodule:: motor.motor_tornado +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + Non-Blocking ============ Motor is an asynchronous driver for MongoDB. It can be used from Tornado_ or diff --git a/doc/index.rst b/doc/index.rst index 0982c9a7..08e0797e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,6 +4,10 @@ Motor: Asynchronous Python driver for MongoDB .. image:: _static/motor.png :align: center +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + About ----- diff --git a/doc/installation.rst b/doc/installation.rst index 08fc229b..7a170a93 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -1,6 +1,11 @@ Installation ============ +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + Install Motor from PyPI_ with pip_:: $ python3 -m pip install motor diff --git a/doc/migrate-to-motor-2.rst b/doc/migrate-to-motor-2.rst index f90be847..9c135bcd 100644 --- a/doc/migrate-to-motor-2.rst +++ b/doc/migrate-to-motor-2.rst @@ -1,6 +1,11 @@ Motor 2.0 Migration Guide ========================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + .. currentmodule:: motor.motor_tornado Motor 2.0 brings a number of changes to Motor 1.0's API. The major version is diff --git a/doc/migrate-to-motor-3.rst b/doc/migrate-to-motor-3.rst index dd289320..6c731a65 100644 --- a/doc/migrate-to-motor-3.rst +++ b/doc/migrate-to-motor-3.rst @@ -1,6 +1,11 @@ Motor 3.0 Migration Guide ========================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + .. currentmodule:: motor.motor_tornado Motor 3.0 brings a number of changes to Motor 2.0's API. The major version is diff --git a/doc/requirements.rst b/doc/requirements.rst index afddeff0..7ccd4b44 100644 --- a/doc/requirements.rst +++ b/doc/requirements.rst @@ -1,6 +1,11 @@ Requirements ============ +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + The current version of Motor requires: * CPython 3.9 and later. diff --git a/doc/tutorial-asyncio.rst b/doc/tutorial-asyncio.rst index 463d3d10..b6a5c09e 100644 --- a/doc/tutorial-asyncio.rst +++ b/doc/tutorial-asyncio.rst @@ -3,6 +3,11 @@ Tutorial: Using Motor With :mod:`asyncio` ========================================= +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + .. These setups are redundant because I can't figure out how to make doctest run a common setup *before* the setup for the two groups. A "testsetup:: *" is the obvious answer, but it's run *after* group-specific setup. @@ -454,8 +459,7 @@ to an :class:`aiohttp.web.Application`: :start-after: main-start :end-before: main-end -.. warning:: - It is a common mistake to create a new client object for every request; this comes at a dire performance cost. +.. warning:: It is a common mistake to create a new client object for every request; this comes at a dire performance cost. Create the client when your application starts and reuse that one client for the lifetime of the process. You can maintain the client by storing a database handle from the client on your application object, as shown in this example. diff --git a/doc/tutorial-tornado.rst b/doc/tutorial-tornado.rst index b51d3072..5afc23fc 100644 --- a/doc/tutorial-tornado.rst +++ b/doc/tutorial-tornado.rst @@ -3,6 +3,11 @@ Tutorial: Using Motor With Tornado ================================== +.. warning:: Motor will be deprecated on May 14th, 2026, one year after the production release of the PyMongo Async driver. + We strongly recommend that Motor users migrate to the PyMongo Async driver while Motor is still supported. + To learn more, see `the migration guide `_. + + .. These setups are redundant because I can't figure out how to make doctest run a common setup *before* the setup for the two groups. A "testsetup:: *" is the obvious answer, but it's run *after* group-specific setup. @@ -152,8 +157,7 @@ makes it available to request handlers:: def get(self): db = self.settings['db'] -.. warning:: - It is a common mistake to create a new client object for every +.. warning:: It is a common mistake to create a new client object for every request; **this comes at a dire performance cost**. Create the client when your application starts and reuse that one client for the lifetime of the process, as shown in these examples.