Noah Stapp
32a5933d52
PYTHON-4532 - Fix blank docs pages for generated modules ( #1722 )
2024-06-27 15:19:47 -07:00
Noah Stapp
d6bf0e1e78
PYTHON-4264 Async PyMongo Beta ( #1629 )
2024-06-06 09:01:24 -07:00
Steven Silvester
6537415da7
PYTHON-3605 Move type annotations to parameter list in rendered docs ( #1441 )
2023-11-27 09:24:00 -06: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
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
Steven Silvester
1a249386cf
PYTHON-3723 Add search index management helpers ( #1224 )
2023-07-14 09:51:19 -05:00
Iris
fd095955f5
PYTHON-3777 add types to command_cursor.py ( #1285 )
2023-07-03 15:16:33 -07:00
Noah Stapp
cae124c32c
PYTHON-3588 Expose an API to create a cursor from a command response ( #1263 )
2023-06-28 14:19: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
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
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting ( #868 )
2022-02-17 06:44:08 -06:00
Shane Harvey
09f8aa9928
PYTHON-3072 Use _Address in more places ( #871 )
2022-02-15 15:49:39 -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
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
Prashant Mital
70a1fec9a2
PYTHON-1363 Remove unused retrieved parameter from CommandCursor ( #689 )
2021-07-28 15:55:21 -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
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
4c77d7c855
PYTHON-2677 Better wait queue timeout errors for load balanced clusters ( #639 )
...
Remove checkout argument in favor of SocketInfo.pin_txn/pin_cursor()
2021-06-21 18:29:36 -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
209d5009e6
PYTHON-1860 Use OP_MSG for find/aggregate_raw_batches when supported ( #622 )
2021-05-19 12:05:35 -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
Prashant Mital
ddac30d2ff
PYTHON-1742 add postBatchResumeToken support
...
PYTHON-1815 add tests for postBatchResumeToken support
PYTHON-1845 clarify resume token used in resuming and getResumeToken
2019-07-25 17:18:35 -07:00
Shane Harvey
a15266083b
PYTHON-1674 Support retryable reads
...
Add retryReads URI option that defaults to True.
Supported read operations will be retried once after transient
network, election, and shutdown errors on MongoDB 3.6+.
Supported operations are:
listCollections, listIndexes, and listDatabases
distinct
count, estimated_document_count, count_documents
aggregate (not including $out)
find (only for the initial find command, getMore commands are not
retried).
ChangeStreams: watch (initial aggregate command).
GridFS read APIs.
Test changes:
Add retryable reads spec test runner.
Disable retryable reads in network error tests.
2019-04-25 14:28:12 -07:00
Shane Harvey
7f4c504560
PYTHON-1674 Refactor Cursor/CommandCursor.__send_message
...
Move exhaust getMore out of Cursor.
Move cursor command response decoding into Server so that all command
listener events can be published in the same location.
2019-04-25 14:27:41 -07:00
Shane Harvey
2cb34e4efc
PYTHON-1814 Support custom type decoder with distinct
...
Fix pure python custom type decoding of bson arrays.
2019-04-17 15:44:51 -07:00
Prashant Mital
749116287a
PYTHON-1783 Decode user-facing documents but not internal driver-server
...
communications.
2019-04-16 15:01:42 -07:00
Shane Harvey
92ddc09b7e
PYTHON-1662 Add ChangeStream.try_next API
2019-03-26 11:14:21 -07:00
Shane Harvey
e64945101b
PYTHON-1684 Support sharded transactions recovery token ( #406 )
...
Transient errors inside transaction unpins the session.
Add brief docs about sharded transactions and add 3.9 changelog.
Tests changes:
Add spec tests for sharded transaction recoveryToken.
Speed up txn tests by reducing SDAM waiting time after a network error.
Remove outdated test workaround for killAllSessions.
2019-02-27 15:59:18 -08:00
Shane Harvey
f9fa34dcd8
PYTHON-1759 Find/getMore command failures reset servers's SDAM state ( #406 )
2019-02-27 15:59:18 -08:00
Bernie Hackett
548343c29e
PYTHON-1551 - Deprecate MongoClient.close_cursor
2018-06-06 11:17:02 -07:00
Shane Harvey
5a652be993
PYTHON-1508 Add read_preference to TransactionOptions
...
All read operations use the transaction's read preference.
Add transaction read preference spec tests.
Remove write test in test_read_preferences.
2018-05-08 11:38:28 -07:00
Shane Harvey
c6488c117d
Ending a session always aborts the transaction
2018-04-16 09:57:45 -04:00
Shane Harvey
cd92850b36
Test changing transaction readPreference
...
Add original readPreference to getMores to simplify code check.
2018-04-16 09:57:45 -04:00
A. Jesse Jiryu Davis
9df87b6401
prototype transaction tests
2018-04-16 09:57:45 -04:00
Bernie Hackett
507f954ed4
Update copyright dates
2017-12-01 17:23:39 -08:00
Shane Harvey
b669cd86dc
PYTHON-1332 Session may only be used by the client that started it.
...
Centralize $clusterTime receiving.
2017-11-17 09:27:21 -08:00
Shane Harvey
49cee292cc
PYTHON-1408 Cursor iteration should complete when another thread closes the cursor.
...
Closing a cursor should not raise an error when killCursors fails.
2017-11-13 13:08:38 -08:00
Bernie Hackett
4eda4ffaec
PYTHON-1340 - Implement causally consistent reads
2017-11-09 17:16:55 -08:00
A. Jesse Jiryu Davis
df018e88e2
PYTHON-1332 - Gossip $clusterTime
2017-10-12 09:08:38 -04:00
Shane Harvey
f0b847adb8
PYTHON-1329 Refactor wire protocol message parsing.
...
Use _OpReply class instead of passing bytes around.
Remove unnecessary operation argument to receive message.
Move _first_batch to message.py to avoid circular import.
2017-10-09 15:11:50 -07:00
A. Jesse Jiryu Davis
6fa2e4047f
PYTHON-1332 - Send lsid with all commands
2017-09-29 14:52:26 -04:00