Skip to content

PYTHON-3018 Add docs for removed methods from Collection #801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/migrate-to-pymongo4.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _pymongo4-migration-guide:

PyMongo 4 Migration Guide
=========================

Expand Down
7 changes: 7 additions & 0 deletions pymongo/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, can you make a similar change for MongoClient and Database?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


.. versionchanged:: 3.6
Added ``session`` parameter.

Expand Down
7 changes: 7 additions & 0 deletions pymongo/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ def __init__(self, client, name, codec_options=None, read_preference=None,

.. seealso:: The MongoDB documentation on `databases <https://dochub.mongodb.org/core/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.

Expand Down
16 changes: 10 additions & 6 deletions pymongo/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,16 @@ def __init__(
.. seealso:: The MongoDB documentation on `connections <https://dochub.mongodb.org/core/connections>`_.

.. versionchanged:: 4.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please combine this with the existing versionchanged below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

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.
Expand Down