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

Conversation

juliusgeo
Copy link
Contributor

No description provided.

@juliusgeo juliusgeo requested review from ShaneHarvey and removed request for ShaneHarvey November 20, 2021 00:59

Removed. Use :meth:`pymongo.collection.Collection.bulk_write`
instead. Code like this::
batch = coll.initialize_(un)ordered_bulk_op()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if it would be better to separate into two sections. Saying "(un)ordered" makes sense to me but might not be clear to the user.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

Instead of duplicating the docs from the migration guide, let's link to the guide itself. Something like this:

..versionchanged:: 4.0
  Removed the insert, save, count, .... methods. See the <link to migration guide>.

We can put this in the Collection docstring.

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.

@@ -503,6 +503,11 @@ 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.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

LGTM

@juliusgeo juliusgeo merged commit 7de879a into mongodb:master Nov 24, 2021
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 5, 2022
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants