Jeffrey A. Clark
166821f22c
PYTHON-5205 Replace http with https in doc links ( #2204 )
2025-03-14 21:37:11 -04:00
Steven Silvester
8bafdb04e4
PYTHON-4747 Sync mongo_client.py to master
2024-09-10 12:16:04 -05:00
Steven Silvester
1cbcf14e0d
PYTHON-4747 Rename pymongo/mongo_client.py to pymongo/synchronous/mongo_client.py
2024-09-10 12:16:04 -05:00
Shane Harvey
50eeb6788b
PYTHON-4348 Reinstate fork warning because network I/O and threads are not fork safe ( #1597 )
2024-04-16 16:22:39 -07:00
Steven Silvester
cbf11da323
PYTHON-3741 Fix rendering of CodecOptions links in docs ( #1594 )
2024-04-16 10:58:26 -05:00
Steven Silvester
2df024f814
PYTHON-3984 Deprecate WriteConcern.wtimeout in favor of pymongo.timeout() ( #1591 )
2024-04-16 05:27:09 -05:00
Noah Stapp
266b3dd8e9
PYTHON-3835 Log informational message client-side based on detected environment ( #1537 )
2024-03-07 14:53:09 -08:00
Steven Silvester
0793138d7f
PYTHON-4117 Require 4.3.1+ server version when using failCommand errorLabels option ( #1526 )
2024-02-20 13:28:08 -06:00
Steven Silvester
158e6c6574
PYTHON-4218 Update links to change-streams specification ( #1525 )
2024-02-16 08:37:03 -06:00
Noah Stapp
ebb94b669e
PYTHON-3457 Easier debugging with standardized logging ( #1515 )
...
PYTHON-3458 Add command logging.
PYTHON-3459 Add server selection logging.
PYTHON-3473 Add connection pool logging.
PYTHON-4167 Add documentation and examples.
Co-authored-by: sleepyStick <itsirisho@gmail.com>
2024-02-15 11:35:08 -08:00
Noah Stapp
62c6d0f330
PYTHON-3587 Do not perform server selection to determine sessions support ( #1491 )
2024-02-05 13:19:26 -08:00
Steven Silvester
1d65448af6
Revert "PYTHON-4018 Clarify exactly what code/label fields drivers should inspect to determine retryability" ( #1495 )
2024-01-31 13:57:23 -06:00
Steven Silvester
85b0c0e3c1
PYTHON-4018 Clarify exactly what code/label fields drivers should inspect to determine retryability ( #1489 )
2024-01-29 12:58:15 -06: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
Jib
0ff6a87438
PYTHON-4038: Ensure retryable read OperationFailures re-raise exception when 0 or NoneType error code is provided. ( #1425 )
2023-11-15 15:03:36 -05:00
Noah Stapp
5dc60342ed
PYTHON-2834 Direct read/write retries to another mongos if possible ( #1421 )
2023-11-14 12:49:42 -08:00
Steven Silvester
7936708d97
PYTHON-4014 Apply QA Suggestions from Scientific Python Library Development Guide ( #1414 )
2023-11-01 19:37:22 -05:00
Shane Harvey
a09a03e5df
PYTHON-3930 Add docs page for network compression ( #1415 )
2023-11-01 11:53:15 -07:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff ( #1399 )
2023-10-19 11:56:22 -05:00
Shane Harvey
4c00227c1d
PYTHON-3668 Use polling SDAM mode on FaaS and add sdamMode=auto/stream/poll ( #1360 )
...
Disable streaming SDAM by default on AWS Lambda and similar FaaS platforms.
Introduce the serverMonitoringMode=stream/poll/auto URI option.
Add Unified Test Format version 1.17 to add support for server heartbeat events.
2023-10-12 13:19:16 -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
Jib
3e1a4ab56e
PYTHON-3739 Refactor retryable reads and writes logic to avoid duplication ( #1344 )
...
* first draft commit; consolidated _retryable_(read|write) to call _retry_internal
* removed extra self usage
* formatting
* swapped last_error usage
* switched to using more objective syntax
* black formatter
* don't use conn_from_server
* changed variable naming is_write -> is_read; consolidated errorhandling; revisited is_retrying
* added an explicit if not self._is_read catch
* switched self._in_transaction to be self._not_in_transaction
* fixed logic on checking if a read/write was in transaction and added commentary
* fixed encryption-based error getting retried
* separated server selection as the exception raised gets handled differently in each caller
* do not mutate 'retryable' within the class instantiation
* centralized usage of _retryable_write to avoid _retry_with_session used outwardly
* added docstrings to our _retryable_(read|write) operations
* refactored docstrings to align with rest of the file
* clearer docstrings and function calls
2023-08-29 10:13:38 -04:00
Iris
34da931b3a
PYTHON-3867 add types to topology.py ( #1346 )
2023-08-09 14:21:43 -07:00
Iris
e0b8b36f41
PYTHON-3813 add types to pool.py ( #1318 )
2023-08-04 17:28:30 -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
Shane Harvey
469e2e95f5
PYTHON-3511 Cleanup some more Python 2 references ( #1309 )
2023-07-14 17:02:24 -04: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
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
e9a6482c4d
PYTHON-3610 Add blacken-docs to pre-commit hook ( #1170 )
2023-03-14 15:37:45 -05:00
Julius Park
10a55001c8
PYTHON-3626 Document srvMaxHosts in MongoClient options ( #1167 )
2023-03-02 14:14:47 -08:00
Steven Silvester
a3720d9cea
PYTHON-3568 Intellisense highlights multiple PyMongo methods because of CodecOptions ( #1139 )
2023-01-25 09:41:23 -06:00
Julius Park
26efc0f43d
PYTHON-3388 Propagate Original Error for Write Errors Labeled NoWritesPerformed ( #1117 )
2022-12-01 17:54:15 -08:00
Julius Park
c874c96e29
PYTHON-3232 Improved change stream event visibility for C2C Replication ( #1062 )
2022-09-27 15:31:20 -07:00
Shane Harvey
179efda312
PYTHON-3406 Reinstate warning and docs that PyMongo is not fork safe ( #1050 )
...
Log child process C-level stacks when fork tests deadlock.
Encode hostname to bytes to avoid getaddrinfo importlib deadlock.
2022-09-13 14:14:53 -07:00
Ben Warner
3204290e93
PYTHON-2484 Added lock sanitization for MongoClient and ObjectId ( #985 )
2022-08-04 16:58:56 -07:00
Ben Warner
14002a5a0d
PYTHON-1824 Allow encoding/decoding out-of-range datetimes via DatetimeMS and datetime_conversion ( #981 )
...
https://jira.mongodb.org/browse/PYTHON-1824
Co-authored-by: Ben Warner <ben.warner@mongodb.com>
2022-07-27 16:53:52 -07:00
Shane Harvey
667046129a
PYTHON-3289 Apply client timeoutMS to every operation ( #1011 )
2022-07-18 23:22:43 -07:00
Shane Harvey
5c38676d53
PYTHON-3359 Remove Database and Collection timeout override ( #1009 )
...
Remove MongoClient.timeout in favor of client.options.timeout.
2022-07-18 19:54:45 -05:00
Steven Silvester
135efdd23f
PYTHON-3153 Update initial DNS seedlist discovery tests to support dedicated load balancer port ( #1002 )
2022-07-14 14:57:52 -05:00
Steven Silvester
d2b95d1bf0
PYTHON-3336 Test Failure - test_load_balancer failing ( #1000 )
2022-07-08 19:40:25 -05:00
Shane Harvey
b16533951c
PYTHON-3345 CSOT use connection handshake RTT for load balanced mode ( #998 )
2022-07-07 16:55:16 -07:00
Shane Harvey
6acc9f64cf
PYTHON-3333 Fix bug where non-cursor read operations fail in a transaction with directConnection=True on primary ( #991 )
2022-07-06 11:39:41 -07:00
Ben Warner
922e63d6e0
PYTHON-3093 Continuation of #972 ( #976 )
2022-06-16 11:40:09 -07:00
Ben Warner
43c2062305
PYTHON-3093 Change streams support for user-facing PIT pre- and post-images ( #972 )
2022-06-15 11:22:55 -07:00
Atiab Bin Zakaria
b8653b018d
Remove extra period in is_mongos documentation ( #967 )
2022-06-09 11:10:03 -04:00
Shane Harvey
890cd26e1a
PYTHON-3288 Implement client side operation timeout ( #954 )
...
Add timeoutMS URI option and MongoClient keyword argument.
Add provisional/beta pymongo.timeout() api to set a deadline for a block of operations.
2022-06-06 15:36:52 -04:00
Steven Silvester
9f191d6bb3
PYTHON-3283 Remove Generic Typing from the ClientSession Class ( #952 )
2022-05-25 05:55:36 -05:00