Skip to content

Commit 7de879a

Browse files
authored
PYTHON-3018 Add docs for removed methods from Collection (#801)
1 parent 37b5195 commit 7de879a

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

doc/migrate-to-pymongo4.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _pymongo4-migration-guide:
2+
13
PyMongo 4 Migration Guide
24
=========================
35

pymongo/collection.py

+7
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ def __init__(self, database, name, create=False, codec_options=None,
115115
- `**kwargs` (optional): additional keyword arguments will
116116
be passed as options for the create collection command
117117
118+
.. versionchanged:: 4.0
119+
Removed the reindex, map_reduce, inline_map_reduce,
120+
parallel_scan, initialize_unordered_bulk_op,
121+
initialize_ordered_bulk_op, group, count, insert, save,
122+
update, remove, find_and_modify, and ensure_index methods. See the
123+
:ref:`pymongo4-migration-guide`.
124+
118125
.. versionchanged:: 3.6
119126
Added ``session`` parameter.
120127

pymongo/database.py

+7
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ def __init__(self, client, name, codec_options=None, read_preference=None,
6969
7070
.. seealso:: The MongoDB documentation on `databases <https://dochub.mongodb.org/core/databases>`_.
7171
72+
.. versionchanged:: 4.0
73+
Removed the eval, system_js, error, last_status, previous_error,
74+
reset_error_history, authenticate, logout, collection_names,
75+
current_op, add_user, remove_user, profiling_level,
76+
set_profiling_level, and profiling_info methods.
77+
See the :ref:`pymongo4-migration-guide`.
78+
7279
.. versionchanged:: 3.2
7380
Added the read_concern option.
7481

pymongo/mongo_client.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,16 @@ def __init__(
504504
.. seealso:: The MongoDB documentation on `connections <https://dochub.mongodb.org/core/connections>`_.
505505
506506
.. versionchanged:: 4.0
507-
Removed the ``waitQueueMultiple`` and ``socketKeepAlive`` keyword
508-
arguments.
509-
The default for `uuidRepresentation` was changed from
510-
``pythonLegacy`` to ``unspecified``.
511-
Added the ``srvServiceName`` and ``maxConnecting`` URI and keyword
512-
argument.
507+
508+
- Removed the fsync, unlock, is_locked, database_names, and
509+
close_cursor methods.
510+
See the :ref:`pymongo4-migration-guide`.
511+
- Removed the ``waitQueueMultiple`` and ``socketKeepAlive``
512+
keyword arguments.
513+
- The default for `uuidRepresentation` was changed from
514+
``pythonLegacy`` to ``unspecified``.
515+
- Added the ``srvServiceName`` and ``maxConnecting`` URI and
516+
keyword argument.
513517
514518
.. versionchanged:: 3.12
515519
Added the ``server_api`` keyword argument.

0 commit comments

Comments
 (0)