diff --git a/doc/migrate-to-pymongo4.rst b/doc/migrate-to-pymongo4.rst index 5acd3a5d12..22071bd3bb 100644 --- a/doc/migrate-to-pymongo4.rst +++ b/doc/migrate-to-pymongo4.rst @@ -1,3 +1,5 @@ +.. _pymongo4-migration-guide: + PyMongo 4 Migration Guide ========================= diff --git a/pymongo/collection.py b/pymongo/collection.py index 8632204b81..774c290235 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -115,6 +115,13 @@ def __init__(self, database, name, create=False, codec_options=None, - `**kwargs` (optional): additional keyword arguments will be passed as options for the create collection command + .. versionchanged:: 4.0 + Removed the reindex, map_reduce, inline_map_reduce, + parallel_scan, initialize_unordered_bulk_op, + initialize_ordered_bulk_op, group, count, insert, save, + update, remove, find_and_modify, and ensure_index methods. See the + :ref:`pymongo4-migration-guide`. + .. versionchanged:: 3.6 Added ``session`` parameter. diff --git a/pymongo/database.py b/pymongo/database.py index c30d29bde4..dc8c13cbb0 100644 --- a/pymongo/database.py +++ b/pymongo/database.py @@ -69,6 +69,13 @@ def __init__(self, client, name, codec_options=None, read_preference=None, .. seealso:: The MongoDB documentation on `databases `_. + .. versionchanged:: 4.0 + Removed the eval, system_js, error, last_status, previous_error, + reset_error_history, authenticate, logout, collection_names, + current_op, add_user, remove_user, profiling_level, + set_profiling_level, and profiling_info methods. + See the :ref:`pymongo4-migration-guide`. + .. versionchanged:: 3.2 Added the read_concern option. diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index dd9dd6d33a..af159da521 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -504,12 +504,16 @@ def __init__( .. seealso:: The MongoDB documentation on `connections `_. .. versionchanged:: 4.0 - Removed the ``waitQueueMultiple`` and ``socketKeepAlive`` keyword - arguments. - The default for `uuidRepresentation` was changed from - ``pythonLegacy`` to ``unspecified``. - Added the ``srvServiceName`` and ``maxConnecting`` URI and keyword - argument. + + - Removed the fsync, unlock, is_locked, database_names, and + close_cursor methods. + See the :ref:`pymongo4-migration-guide`. + - Removed the ``waitQueueMultiple`` and ``socketKeepAlive`` + keyword arguments. + - The default for `uuidRepresentation` was changed from + ``pythonLegacy`` to ``unspecified``. + - Added the ``srvServiceName`` and ``maxConnecting`` URI and + keyword argument. .. versionchanged:: 3.12 Added the ``server_api`` keyword argument.