Skip to content

Conversation

juliusgeo
Copy link
Contributor

Deprecate mapReduce helpers

@juliusgeo juliusgeo changed the title PYTHON 2850 [v3.13] Deprecate mapReduce command PYTHON-2850 [v3.13] Deprecate mapReduce command Feb 10, 2022
@juliusgeo juliusgeo requested a review from blink1073 February 10, 2022 18:01
@blink1073
Copy link
Member

Can you please add a version changed entry for both methods as well?

@@ -3091,6 +3093,10 @@ def map_reduce(self, map, reduce, out, full_response=False, session=None, **kwar
this collection is automatically applied to this operation (if the
output is not inline) when using MongoDB >= 3.4.

.. versionchanged:: 3.13
Deprecated :meth:`map_reduce`. Support for this function is deprecated in
Copy link
Member

Choose a reason for hiding this comment

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

We should also say that this is removed in PyMongo 4.0:
https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html#collection-map-reduce-and-collection-inline-map-reduce-are-removed

You should say here what users should do instead. An abbreviated version of what the PyMongo 4 upgrade guide says.

@@ -3153,11 +3163,16 @@ def inline_map_reduce(self, map, reduce, full_response=False, session=None, **kw

>>> db.test.inline_map_reduce(map, reduce, limit=2)

.. versionchanged:: 3.13
Deprecated :meth:`inline_map_reduce`. Support for this function is deprecated in
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here.

@juliusgeo
Copy link
Contributor Author

juliusgeo commented Feb 11, 2022

Managed to accidentally merge with master rather than the v3.13 branch so there are a tonnn of messed up changes. I think I'm just gonna create this from scratch in a new PR given how small it is.
EDIT: Nevermind, I was able to fix it.

@juliusgeo juliusgeo requested review from behackett and removed request for behackett February 11, 2022 04:45
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@juliusgeo juliusgeo merged commit a051d2b into mongodb:v3.13 Feb 11, 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.

3 participants