[DOCS-7402] Indicate driver version in primer docs Created: 11/Mar/16 Updated: 27/Feb/23 Resolved: 27/Feb/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | primer |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7, docs-triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: https://docs.mongodb.org/getting-started/python/remove/ |
||
| Participants: | |
| Days since reply: | 49 weeks, 2 days ago |
| Description |
|
Original user comment:
We don't currently specify which version of PyMongo (or, I assume, any of the other drivers) we're using in the examples. It might be practical to indicate that you need to be on 2.9+ for the examples to work (or the equivalents for the other drivers). Some folks won't realize that they're a few drivers back. |
| Comments |
| Comment by John Williams [ 27/Feb/23 ] |
|
Python 2 is no longer supported so I think this ticket has gone away |
| Comment by Allison Reinheimer Moore [ 11/Mar/16 ] |
|
PyMongo 2.9 revamped the CRUD methods significantly – the delete_one method was added at that point. You can check which version of PyMongo you're using by running import pymongo and then pymongo.version from a python shell. This getting started guide uses the new CRUD methods – we do not have a version for the earlier drivers. For your case, you'd need to use the remove() method, being sure to carefully specify the document that you wish to remove, rather than the new delete_one(). You can find the PyMongo reference documentation for each version here: http://api.mongodb.org/python/. If you wish to upgrade your PyMongo version (the new methods are pretty great), there's also a migration guide. From our end, adding an indication of what driver version we're using seems like a good idea - I'm going to scope this ticket to address that. |