Commit Graph

339 Commits

Author SHA1 Message Date
Steven Silvester
731bf9bbc0
PYTHON-4747 Sync cursor.py to master 2024-09-10 12:16:05 -05:00
Steven Silvester
489b2f8a1a
PYTHON-4747 Rename pymongo/cursor.py to pymongo/synchronous/cursor.py 2024-09-10 12:16:05 -05:00
Jib
60d0761527
PYTHON-2884: Replaced SON usage in all internal classes and commands (#1426) 2023-12-19 15:42:23 -08:00
Steven Silvester
6537415da7
PYTHON-3605 Move type annotations to parameter list in rendered docs (#1441) 2023-11-27 09:24:00 -06:00
Steven Silvester
7936708d97
PYTHON-4014 Apply QA Suggestions from Scientific Python Library Development Guide (#1414) 2023-11-01 19:37:22 -05:00
Noah Stapp
d82946334e
PYTHON-3953 - PyMongo should send killCursors on MaxTimeMSExpired Error (#1372) 2023-10-20 13:42:59 -07:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff (#1399) 2023-10-19 11:56:22 -05:00
Noah Stapp
81c759a3a0
PYTHON-2878 Allow passing dict to sort/create_index/hint (#1389) 2023-10-16 14:36:27 -07:00
Steven Silvester
6f4e617e6d
PYTHON-3905 Use from __future__ import annotations in all files (#1370)
* PYTHON-3905 Use from __future__ import annotations in all files

* cleanup

* cleanup

* cleanup
2023-09-11 10:49:24 -05:00
Iris
e0b8b36f41
PYTHON-3813 add types to pool.py (#1318) 2023-08-04 17:28:30 -07:00
Iris
02a365276c
PYTHON-3806 add types to message.py (#1312) 2023-08-02 20:11:25 -07:00
Iris
b7796e1794
PYTHON-3807 add types to mongo_client.py (#1315) 2023-08-01 16:49:33 -07:00
Noah Stapp
c88ae79e58
PYTHON-3879 Rename SocketInfo to Connection (#1329) 2023-07-28 10:04:16 -07:00
Soroush Mahdavi
c6a6ea6066
PYTHON-3511 Remove Python 2 references from the docs (#1161)
Co-authored-by: Nicky Lee <40870742+iceypotato@users.noreply.github.com>
Co-authored-by: DanielZavala11 <89770626+DanielZavala11@users.noreply.github.com>
Co-authored-by: Shane Harvey <shane.harvey@mongodb.com>
2023-07-14 15:30:14 -04:00
Iris
c33b9d6b4d
PYTHON-3780 add types to cursor.py (#1290) 2023-07-13 12:40:30 -07:00
Iris
966a5adc4a
PYTHON-3778 add types to common.py (#1287) 2023-07-05 08:57:42 -07:00
Iris
eb8013ce02
PYTHON-3740 add types to helpers.py (#1246) 2023-06-22 14:21:04 -07:00
Noah Stapp
601d1ec3a1
PYTHON-3737 Use __future__ annotations for forward reference type hints (#1234) 2023-06-15 12:54:29 -07:00
Shane Harvey
0092b0af79
PYTHON-2504 Run pyupgrade 3.4.0 and ruff 0.0.265 (#1196)
pyupgrade --py37-plus bson/*.py pymongo/*.py gridfs/*.py test/*.py tools/*.py test/*/*.py
ruff --fix-only --select ALL --fixable ALL --target-version py37 --line-length=100 --unfixable COM812,D400,D415,ERA001,RUF100,SIM108,D211,D212,SIM105,SIM,PT,ANN204,EM bson/*.py pymongo/*.py gridfs/*.py test/*.py test/*/*.py
2023-05-11 15:27:17 -07:00
Steven Silvester
ee2badff75
PYTHON-3524 Support passing list of strings to create_index (#1121) 2022-11-29 05:27:45 -06:00
Ben Warner
3204290e93
PYTHON-2484 Added lock sanitization for MongoClient and ObjectId (#985) 2022-08-04 16:58:56 -07:00
Steven Silvester
a319075ba7
PYTHON-3197 Update docs.mongodb.com links in source, API & Reference documentation (#926) 2022-04-13 14:11:13 -05:00
Julius Park
9562a81903
PYTHON-3119 getMore helper should explicitly send inherited comment (#904) 2022-03-25 16:47:18 -07:00
Steven Silvester
b3604a81d3
PYTHON-3171 Add usage of NoReturn annotation (#901) 2022-03-16 15:26:10 -05:00
Julius Park
dce5072dd1
PYTHON-3137 Handle falsey values for "let" parameter (#881) 2022-02-18 10:43:07 -08:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Julius Park
ddb6614442
PYTHON-2682 Add support for the comment field to all helpers (#847) 2022-02-09 15:12:02 -08:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
dd6c140d43
PYTHON-3060 Add typings to pymongo package (#831) 2022-02-02 21:12:36 -06:00
Shane Harvey
e154642968
Removed references to outdated server versions (#812) 2021-12-07 15:47:28 -08:00
Julius Park
046d789d9f
PYTHON-2957 Support 'let' option for multiple CRUD commands (#804) 2021-11-30 15:02:40 -08:00
Julius Park
c7d80802be
PYTHON-1853 Empty projections should return the entire document not just the _id (#738) 2021-09-23 14:46:44 -07:00
Bernie Hackett
f64c5aa940 PYTHON-2904 Further language modernization 2021-09-14 12:24:06 -07:00
Bernie Hackett
146179db53 PYTHON-2803 Eliminate the use of 'slave' 2021-09-13 12:47:24 -07:00
Shane Harvey
d9e5666336
PYTHON-2875 Require hint with min/max queries (#712) 2021-09-08 11:32:14 -07:00
Shane Harvey
f9bfd11290
PYTHON-2870 Add support for man/text/latex/etc.. docs output (#708)
Regenerate sphinx makefile with sphinx-quickstart 3.5.4.
Remove problematic mongodoc sphinx extension.
2021-08-19 13:31:46 -07:00
Shane Harvey
69c69a6bfb
PYTHON-2862 Remove versionchanged info for PyMongo <3.0 (#709) 2021-08-19 10:39:26 -07:00
Shane Harvey
e1b068d37a
PYTHON-2525 Remove Collection.count and Cursor.count (#700) 2021-08-10 13:52:29 -07:00
Shane Harvey
be47e4ca14
PYTHON-2532 Remove modifiers option for find methods (#696) 2021-08-09 10:02:36 -07:00
Prashant Mital
8675dc0ea1
PYTHON-2799 Use namespace returned from initial command response for killCursors (#666) 2021-07-07 15:24:49 -07:00
Bernie Hackett
88480299b7 PYTHON-2766 Warn users away from cursor slices 2021-06-29 18:10:48 -07:00
Shane Harvey
6bc5e088af
PYTHON-1272 Fix deadlock when garbage collecting pinned cursors and sessions (#642)
It's not safe to return the pinned connection to the pool from within
Cursor.del because the Pool's lock may be held by a python thread
while the cyclic garbage collector runs. Instead we send the cursor
cleanup request to the client's background thread. The thread will
send killCursors on the pinned socket and then return the socket to
the pool.
Also fixed a similar bug when garbage collecting a pinned session.
2021-06-22 17:29:26 -07:00
Shane Harvey
c8f32a7a37 PYTHON-2673 Connection pinning behavior for load balanced clusters (#630)
Tweak spec test because pymongo unpins cursors eagerly after errors.
Tweak spec test for PoolClearedEvent ordering when MongoDB handshake fails (see DRIVERS-1785).
Only skip killCursors for some error codes.
Rely on SDAM error handling to close the connection after a state change error.
Add service_id to various events.
Retain reference to pinned sockets to prevent premptive closure by CPython's cyclic GC.
2021-06-15 14:14:56 -07:00
Prashant Mital
d26bf933ed
PYTHON-1636 Support exhaust cursors in OP_MSG (#629) 2021-05-27 17:16:50 -07:00
Prashant Mital
209d5009e6
PYTHON-1860 Use OP_MSG for find/aggregate_raw_batches when supported (#622) 2021-05-19 12:05:35 -07:00
Khanh Nguyen
1818553fc9
PYTHON-1880: Raise a warning when no_cursor_timeout is used with an implicit session (#594) 2021-04-23 10:58:25 -07:00
Shane Harvey
7c1060cfec
PYTHON-1307 Remove SONManipulator APIs (#557) 2021-01-25 16:22:00 -08:00
Bernie Hackett
6c2d629006 PYTHON-2133 Remove Py2 compatibility from pymongo 2021-01-19 21:15:20 -08:00
Shane Harvey
0e250bef75
PYTHON-1301/PYTHON-1302/PYTHON-1588 Remove deprecated cursor manager APIs (#550)
Remove MongoClient.set_cursor_manager and pymongo.cursor_manager.
Remove MongoClient.kill_cursors and MongoClient.close_cursor.

Co-authored-by: kAldown <kaldownb@gmail.com>
2021-01-15 17:52:54 -08:00
Shane Harvey
7e2790cc44
PYTHON-2220 Mention Atlas Search in documentation (#455) 2020-07-07 16:16:21 -07:00