Commit Graph

86 Commits

Author SHA1 Message Date
Iris
0e407351a4
PYTHON-5392 Better test assertions for comparisons (#2350)
Co-authored-by: Noah Stapp <noah@noahstapp.com>
2025-06-27 14:06:00 -07:00
Noah Stapp
e2bfa9a590
PYTHON-5248 - Drop support for MongoDB 4.0 (#2353) 2025-06-20 14:25:19 -04:00
Iris
b8460b6001
PYTHON-5387 Better test assertions for membership (#2348) 2025-05-23 09:04:32 -07:00
Iris
65089ead4c
PYTHON-5386 Better test assertions for isinstance (#2347) 2025-05-22 16:15:44 -07:00
Noah Stapp
34ca759f85
PYTHON-5113 - Refactor test utils for async (#2149) 2025-03-12 12:59:56 -04:00
Noah Stapp
9a7bac7d45
PYTHON-4865 - Re-enable TestBulkWriteConcern tests (#2144) 2025-02-12 08:15:55 -05:00
Noah Stapp
0e8d70457f
Async client uses tasks instead of threads
PYTHON-4725 - Async client should use tasks for SDAM instead of threads
PYTHON-4860 - Async client should use asyncio.Lock and asyncio.Condition
PYTHON-4941 - Synchronous unified test runner being used in asynchronous tests
PYTHON-4843 - Async test suite should use a single event loop
PYTHON-4945 - Fix test cleanups for mongoses

Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com>
2024-11-26 16:55:27 -05:00
Steven Silvester
d1375d4178
PYTHON-4865 Skip test_write_concern_failure tests temporarily (#1936) 2024-10-16 13:41:35 -05:00
Noah Stapp
739510214b
PYTHON-4731 - Explicitly close all MongoClients opened during tests (#1855) 2024-09-17 09:22:17 -04:00
Shane Harvey
4e102235ad
PYTHON-4560 Disable rsSyncApplyStop tests on 8.0+ (#1840) 2024-09-06 10:16:38 -07:00
Iris
b37fb91896
PYTHON-4704 Migrate test_bulk.py to async (#1827) 2024-09-04 10:36:35 -07:00
Noah Stapp
d0193eb045
PYTHON-4533 - Convert test/test_client.py to async (#1730) 2024-07-10 13:15:13 -07:00
Noah Stapp
ffa6555485
PYTHON-4476 Separate data and IO classes more effectively (#1678) 2024-06-26 10:12:39 -07:00
Noah Stapp
d6bf0e1e78
PYTHON-4264 Async PyMongo Beta (#1629) 2024-06-06 09:01:24 -07:00
Steven Silvester
7936708d97
PYTHON-4014 Apply QA Suggestions from Scientific Python Library Development Guide (#1414) 2023-11-01 19:37:22 -05:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff (#1399) 2023-10-19 11:56:22 -05: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
92e6150d84
PYTHON-3493 Bulk Write InsertOne Should Be Parameter Of Collection Type (#1106) 2022-11-10 14:19:55 -08: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
Steven Silvester
abfa0d35bc
PYTHON-3075 bulk_write does not apply CodecOptions to upserted_ids result (#840) 2022-02-02 13:53:58 -06:00
Shane Harvey
8b2eb24c35
PYTHON-2164 Remove client max_bson_size/max_message_size/max_write_batch_size (#766)
Use the hello command instead:
doc = client.admin.command('hello')
max_bson_size = doc['maxBsonObjectSize']
max_message_size = doc['maxMessageSizeBytes']
max_write_batch_size = doc['maxWriteBatchSize']

Also add documentation for TopologyDescription.apply_selector.
2021-11-01 14:26:47 -07: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
69dee51b90
PYTHON-1318 Remove initialize_unordered_bulk_op and initialize_ordered_bulk_op (#692)
PYTHON-2436 Unskip test_large_inserts_ordered on MongoDB 5.0.
2021-08-05 17:58:15 -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
Shane Harvey
ac2f506ba2
PYTHON-2453 Add MongoDB Versioned API (#536)
Add pymongo.server_api.ServerApi and the MongoClient server_api option.
Support Unified Test Format version 1.1 (serverParameters in
runOnRequirements)
Skip dropRole tests due to SERVER-53499.
2021-01-11 18:16:00 -08:00
Shane Harvey
083c2474da PYTHON-2055 Subtract message header from compressed bulk OP_MSG
This change prevents pymongo from generating a bulk OP_COMPRESSED/OP_MSG
with an uncompressed message larger than the server's limit of
maxMessageSizeBytes - 16.
2019-11-14 16:24:08 -08:00
Prashant Mital
aefd02a801
PYTHON-1798 Support pipelines in update commands 2019-06-13 20:26:02 -07:00
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Bernie Hackett
4fa72033dd PYTHON-1488 - Fix auth tests for MongoDB 3.7 2018-02-26 15:32:55 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Bernie Hackett
7ab179067b PYTHON-1299 - More test cleanup 2017-11-09 18:53:29 -08:00
Shane Harvey
3e778334e7 PYTHON-1299 Remove test logic for MongoDB <2.6. 2017-09-29 12:09:24 -07:00
Shane Harvey
14ce90906c PYTHON-1296 Support array_filters updates.
Sync crud tests.
2017-09-08 12:23:40 -07:00
Shane Harvey
e89ed11113 PYTHON-1317 Deprecate legacy bulk write api.
Use Collection.bulk_write() in documentation examples.
Move deprecated bulk tests to test_legacy_api.
2017-08-04 21:41:29 -07:00
Shane Harvey
9468c119a3 PYTHON-1335 Improve __slots__ usage.
__slots__ must be defined in all classes in the hierarchy to avoid __dict__
and __weakref__ overhead.
2017-08-03 14:57:43 -07: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
Bernie Hackett
e89ba4bcd0 PYTHON-1026 - Remove test assumption about primary host 2016-09-21 11:15:43 -07:00
aherlihy
f5b44ea35f PYTHON-982 - Support bypassDocumentValidation 2015-11-18 14:17:56 -08:00
Bernie Hackett
519f0682c5 Fix a bulk operations test for MongoDB 3.2 behavior change 2015-10-05 14:44:49 -07:00
Adam Meily
1e5c8974ee Added unit test for insert_many() with a generator 2015-08-06 14:58:37 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
d2f9807cd1 PYTHON-857 - Remove MongoClient.(min|max)_wire_version.
The min_wire_version and max_wire_version attributes have
always been racy when connected to a mixed version replica set
or any sharded cluster. When connected to a mongos all you know
is the wire version of that mongos, not the shards behind it.
With mongos load balancing this problem is even worse, since
each operation could possibly be executed on a different mongo
version during an upgrade.
2015-03-24 14:38:25 -07:00
Bernie Hackett
f93c73aa73 PYTHON-861 - create/ensure index changes
- Deprecate ensure_index
- Remove caching from create_index
- In create_index, remove support for the cache_for param, and the
  bucket_size and drop_dups aliases (they all remain in ensure_index)
- GridFS uses create_index
- Fix up tests.
2015-03-14 13:38:13 -07:00
Bernie Hackett
d69f76d380 Finalize option locations and exports.
- Move ReturnDocument to pymongo.collection.
- Change ReturnDocument.Before to ReturnDocument.BEFORE
- Change ReturnDocument.After to ReturnDocument.AFTER
- Add pymongo.cursor.CursorType.
- Move pymongo.cursor.NON_TAILABLE and friends to attributes of CursorType.
- read_preferences.ReadPreference is once again an "enum".
- Fix docs for read_preferences.ReadPreference.
- Rename pymongo.options to pymongo.operations.
- Export CursorType, ReturnDocument, WriteConcern, and public classes
  from pymongo.opertions through pymongo/__init__.py
- Fix up a number of documentation issues in the process.
2015-03-05 11:35:46 -08:00
Bernie Hackett
3f3b6bedfc PYTHON-846 - Database.connection -> Database.client 2015-02-25 11:57:39 -08:00
Bernie Hackett
839893939e PYTHON-821 - Deprecated legacy API.
This commit deprecates insert, update, save, and remove. Each
now raises DeprecationWarning at stacklevel 2. This change also
updates all tutorials and example documentation to use the new
CRUD API, tests the deprecations, and fixes up a few more tests
that were still using the legacy API.
2015-02-20 15:41:45 -08:00
Bernie Hackett
30af616009 PYTHON-821 - Migrate most tests to new the CRUD API. 2015-02-13 08:46:43 -08:00
Bernie Hackett
b9cd7b627b PYTHON-821 - Introduce results and options modules. 2015-02-11 13:52:51 -08:00