Commit Graph

61 Commits

Author SHA1 Message Date
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
24170dd523
PYTHON-3523 Remove getNonce command usage for 6.2+ (#1135) 2023-01-12 12:08:53 -06:00
Shane Harvey
79aa5e6757
PYTHON-3516 Improve test EventListener api (#1114) 2022-11-14 08:50:08 -08:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
f4cef37328
PYTHON-3064 Add typings to test package (#844) 2022-02-07 19:33:41 -06:00
Shane Harvey
11752ed594
PYTHON-2899 Remove code for MongoDB <= 3.4 (#729)
Remove unneeded memoryview to bytes conversion.
2021-09-16 16:53:50 -07:00
Bernie Hackett
ad4315134c PYTHON-2803 Get rid of most uses of 'master'
This change also resolves PYTHON-2848 for MongoDB 4.0.
2021-09-13 12:50:49 -07:00
Shane Harvey
3513ab72b0 PYTHON-2528 Remove Database.current_op 2021-08-04 11:14:50 -07:00
Prashant Mital
f07da34f97
PYTHON-2545 Test Atlas Serverless (#664) 2021-07-27 16:35:09 -07:00
Prashant Mital
ff6ca53328
PYTHON-2572 Introduce NotPrimaryError and deprecate NotMasterError (#646) 2021-06-22 13:24:07 -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
Shane Harvey
93ac5e0277
PYTHON-2676 Add load balancer tests in EVG (#625)
Add load balancer spec tests
Ensure LB supports retryable reads/writes
Add assertNumberConnectionsCheckedOut, createFindCursor, ignoreResultAndError
Add PoolClearedEvent.service_id and fix isClientError unified test assertion
2021-05-27 15:05:26 -07:00
Shane Harvey
e01d9a37e7
PYTHON-1320 Remove legacy CRUD methods (#556)
Remove save, insert, update, remove, and find_and_modify.
Remove tools/benchmark.py
2021-01-22 17:11:15 -08:00
Bernie Hackett
a72e8b8823 PYTHON-2133 Remove py2 support from test
Also delete bson/py3compat.py
2021-01-20 09:40:36 -08:00
Shane Harvey
387bfa0bfa
PYTHON-2310 Remove MongoClient.fsync, unlock, and is_locked (#546) 2021-01-15 11:29:23 -08:00
Shane Harvey
e3f40c30ad
PYTHON-2165 Deprecate MongoClient is_locked, fsync, and unlock helpers (#459) 2020-07-08 17:18:02 -07:00
Shane Harvey
1c29c1a65e
PYTHON-2299 Add the "awaited" field to heartbeat events (#457) 2020-07-08 14:02:34 -07:00
Shane Harvey
5b49557c59 PYTHON-2268 Close clients in test suite 2020-06-03 17:05:59 -07:00
Shane Harvey
33c93223b1 PYTHON-1651 Publish CommandFailedEvent when bulk write fails with a network error 2020-05-12 14:42:27 -07:00
Shane Harvey
463d759ddc PYTHON-2116 Add __repr__ to monitoring events and description classes 2020-04-20 16:13:14 -07:00
Shane Harvey
f588412b67 PYTHON-1842 Implement Connection Monitoring and Pooling spec 2019-06-13 15:50:49 -07:00
Bernie Hackett
7409f844e6 PYTHON-1740 - retryWrites defaults to true 2019-03-06 16:32:53 -08:00
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Shane Harvey
a15c8283dc PYTHON-1584 Skip maxScan tests on 4.1+ 2018-06-12 10:20:49 -07:00
Bernie Hackett
f847be3fcb PYTHON-1502 - Deprecate the snapshot cursor option 2018-03-22 08:47:34 -07:00
Bernie Hackett
1736f702a0 PYTHON-1469 - Ignore unexpected error fields in tests 2018-02-20 13:46:48 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Bernie Hackett
036188a832 PYTHON-1385 - Publish command responses in _first_batch 2017-11-09 10:24:18 -08:00
Bernie Hackett
f107c08754 PYTHON-1355 - list_collections improvements 2017-10-26 16:50:19 -07:00
A. Jesse Jiryu Davis
df018e88e2 PYTHON-1332 - Gossip $clusterTime 2017-10-12 09:08:38 -04:00
Shane Harvey
3e778334e7 PYTHON-1299 Remove test logic for MongoDB <2.6. 2017-09-29 12:09:24 -07:00
A. Jesse Jiryu Davis
a4245ee649 Ensure TestGlobalListener cleans up
This test left unclean global state that broke sessions tests with auth
(PYTHON-1332).
2017-09-13 13:35:34 -04:00
A. Jesse Jiryu Davis
7b1cbace17 PYTHON-1217 - Deprecate the "modifiers" find option 2017-07-24 12:40:15 -04:00
Bernie Hackett
dc3048c79b PYTHON-1254 - Fix test_find_and_get_more for 3.5+ 2017-03-14 12:58:16 -07:00
Bernie Hackett
ba62a400ff PYTHON-1236 - Always publish tuples for connection_id 2017-02-17 13:55:50 -08:00
Bernie Hackett
ba6ef88d10 PYTHON-1026 - Single member replica set testing 2016-11-15 15:25:04 -08:00
Shane Harvey
5905a86785 PYTHON-1075 Support running the entire test suite with SSL/TLS
SSL connections are configurable via the environment variables
"CLIENT_PEM", "CA_PEM", and "CERT_REQS".
2016-09-28 16:34:14 -07:00
aherlihy
d98a745700 PYTHON-1067 - Implement SDAM Monitoring 2016-06-14 15:20:19 +02:00
Luke Lovett
dde4a658b5 PYTHON-981 - Implement ReadConcern. 2015-11-18 14:12:28 -08:00
aherlihy
5396444f3c PYTHON-978 - Use killCursors command 2015-11-18 12:57:48 -08:00
aherlihy
1a3aeea426 PYTHON-978 - Use find/getMore commands 2015-11-18 12:57:47 -08:00
Bernie Hackett
01eb25b2b0 PYTHON-979 - Update fsyncUnlock helper for command monitoring 2015-11-18 12:57:47 -08:00
Bernie Hackett
ec47de71f2 PYTHON-979 - Update currentOp helper for command monitoring 2015-11-18 12:57:47 -08:00
Bernie Hackett
101f704744 PYTHON-952 - Redact command and reply documents for sensitive commands 2015-10-11 14:19:16 -07:00
Bernie Hackett
5c9f97e66c PYTHON-952 - Fix global tests when auth is enabled 2015-10-11 09:48:24 -07:00
Bernie Hackett
6c494079a7 PYTHON-952 - Minor test fix 2015-10-09 17:59:23 -07:00
Bernie Hackett
28885b25e8 PYTHON-952 - API improvements
This commit implements the following simplifications and improvements:

- The Subscriber ABC has been renamed to CommandListener
- The subscribe function has been renamed to register
- The COMMAND constant has been removed
- The get_subscribers function has been removed
- Command listeners can now be registered per MongoClient instance
  instead of just globally
2015-10-09 17:03:51 -07:00
Bernie Hackett
a2a83c005f PYTHON-952 - Publish events for uses of _first_batch 2015-09-30 10:14:04 -07:00