Skip to content

Commit 59825a5

Browse files
committed
Merge branch 'master' into PYTHON-5024
2 parents 32c0f07 + 4849eac commit 59825a5

File tree

15 files changed

+52
-90
lines changed

15 files changed

+52
-90
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildvariants:
66
display_name: OpenSSL 1.0.2 RHEL7 v5.0 Python3.10
77
run_on:
88
- rhel79-small
9-
batchtime: 10080
9+
batchtime: 1440
1010
expansions:
1111
VERSION: "5.0"
1212
PYTHON_VERSION: "3.10"
@@ -17,7 +17,7 @@ buildvariants:
1717
display_name: Other hosts RHEL9-FIPS latest
1818
run_on:
1919
- rhel92-fips
20-
batchtime: 10080
20+
batchtime: 1440
2121
expansions:
2222
VERSION: latest
2323
NO_EXT: "1"
@@ -29,7 +29,7 @@ buildvariants:
2929
display_name: Other hosts RHEL8-zseries latest
3030
run_on:
3131
- rhel8-zseries-small
32-
batchtime: 10080
32+
batchtime: 1440
3333
expansions:
3434
VERSION: latest
3535
NO_EXT: "1"
@@ -40,7 +40,7 @@ buildvariants:
4040
display_name: Other hosts RHEL8-POWER8 latest
4141
run_on:
4242
- rhel8-power-small
43-
batchtime: 10080
43+
batchtime: 1440
4444
expansions:
4545
VERSION: latest
4646
NO_EXT: "1"
@@ -51,7 +51,7 @@ buildvariants:
5151
display_name: Other hosts RHEL8-arm64 latest
5252
run_on:
5353
- rhel82-arm64-small
54-
batchtime: 10080
54+
batchtime: 1440
5555
expansions:
5656
VERSION: latest
5757
NO_EXT: "1"
@@ -62,7 +62,7 @@ buildvariants:
6262
display_name: Other hosts Amazon2023 latest
6363
run_on:
6464
- amazon2023-arm64-latest-large-m8g
65-
batchtime: 10080
65+
batchtime: 1440
6666
expansions:
6767
VERSION: latest
6868
NO_EXT: "1"
@@ -182,7 +182,7 @@ buildvariants:
182182
display_name: Encryption RHEL8
183183
run_on:
184184
- rhel87-small
185-
batchtime: 10080
185+
batchtime: 1440
186186
expansions:
187187
TEST_NAME: encryption
188188
tags: [encryption_tag]
@@ -192,7 +192,7 @@ buildvariants:
192192
display_name: Encryption macOS
193193
run_on:
194194
- macos-14
195-
batchtime: 10080
195+
batchtime: 1440
196196
expansions:
197197
TEST_NAME: encryption
198198
tags: [encryption_tag]
@@ -202,7 +202,7 @@ buildvariants:
202202
display_name: Encryption Win64
203203
run_on:
204204
- windows-64-vsMulti-small
205-
batchtime: 10080
205+
batchtime: 1440
206206
expansions:
207207
TEST_NAME: encryption
208208
tags: [encryption_tag]
@@ -212,7 +212,7 @@ buildvariants:
212212
display_name: Encryption crypt_shared RHEL8
213213
run_on:
214214
- rhel87-small
215-
batchtime: 10080
215+
batchtime: 1440
216216
expansions:
217217
TEST_NAME: encryption
218218
TEST_CRYPT_SHARED: "true"
@@ -223,7 +223,7 @@ buildvariants:
223223
display_name: Encryption crypt_shared macOS
224224
run_on:
225225
- macos-14
226-
batchtime: 10080
226+
batchtime: 1440
227227
expansions:
228228
TEST_NAME: encryption
229229
TEST_CRYPT_SHARED: "true"
@@ -234,7 +234,7 @@ buildvariants:
234234
display_name: Encryption crypt_shared Win64
235235
run_on:
236236
- windows-64-vsMulti-small
237-
batchtime: 10080
237+
batchtime: 1440
238238
expansions:
239239
TEST_NAME: encryption
240240
TEST_CRYPT_SHARED: "true"
@@ -245,7 +245,7 @@ buildvariants:
245245
display_name: Encryption PyOpenSSL RHEL8
246246
run_on:
247247
- rhel87-small
248-
batchtime: 10080
248+
batchtime: 1440
249249
expansions:
250250
TEST_NAME: encryption
251251
SUB_TEST_NAME: pyopenssl
@@ -340,10 +340,10 @@ buildvariants:
340340
- name: kms
341341
tasks:
342342
- name: test-gcpkms
343-
batchtime: 10080
343+
batchtime: 1440
344344
- name: test-gcpkms-fail
345345
- name: test-azurekms
346-
batchtime: 10080
346+
batchtime: 1440
347347
- name: test-azurekms-fail
348348
display_name: KMS
349349
run_on:
@@ -360,7 +360,7 @@ buildvariants:
360360
display_name: Load Balancer
361361
run_on:
362362
- rhel87-small
363-
batchtime: 10080
363+
batchtime: 1440
364364
expansions:
365365
TEST_NAME: load_balancer
366366

@@ -434,29 +434,29 @@ buildvariants:
434434
display_name: Auth OIDC Ubuntu-22
435435
run_on:
436436
- ubuntu2204-small
437-
batchtime: 10080
437+
batchtime: 1440
438438
- name: auth-oidc-local-ubuntu-22
439439
tasks:
440440
- name: "!.auth_oidc_remote .auth_oidc"
441441
display_name: Auth OIDC Local Ubuntu-22
442442
run_on:
443443
- ubuntu2204-small
444-
batchtime: 10080
444+
batchtime: 1440
445445
tags: [pr]
446446
- name: auth-oidc-macos
447447
tasks:
448448
- name: "!.auth_oidc_remote .auth_oidc"
449449
display_name: Auth OIDC macOS
450450
run_on:
451451
- macos-14
452-
batchtime: 10080
452+
batchtime: 1440
453453
- name: auth-oidc-win64
454454
tasks:
455455
- name: "!.auth_oidc_remote .auth_oidc"
456456
display_name: Auth OIDC Win64
457457
run_on:
458458
- windows-64-vsMulti-small
459-
batchtime: 10080
459+
batchtime: 1440
460460

461461
# Perf tests
462462
- name: performance-benchmarks
@@ -465,7 +465,7 @@ buildvariants:
465465
display_name: Performance Benchmarks
466466
run_on:
467467
- rhel90-dbx-perf-large
468-
batchtime: 10080
468+
batchtime: 1440
469469

470470
# Pyopenssl tests
471471
- name: pyopenssl-rhel8
@@ -475,7 +475,7 @@ buildvariants:
475475
display_name: PyOpenSSL RHEL8
476476
run_on:
477477
- rhel87-small
478-
batchtime: 10080
478+
batchtime: 1440
479479
expansions:
480480
SUB_TEST_NAME: pyopenssl
481481
- name: pyopenssl-macos
@@ -485,7 +485,7 @@ buildvariants:
485485
display_name: PyOpenSSL macOS
486486
run_on:
487487
- rhel87-small
488-
batchtime: 10080
488+
batchtime: 1440
489489
expansions:
490490
SUB_TEST_NAME: pyopenssl
491491
- name: pyopenssl-win64
@@ -495,7 +495,7 @@ buildvariants:
495495
display_name: PyOpenSSL Win64
496496
run_on:
497497
- rhel87-small
498-
batchtime: 10080
498+
batchtime: 1440
499499
expansions:
500500
SUB_TEST_NAME: pyopenssl
501501

.evergreen/scripts/generate_config.py

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from generate_config_utils import (
88
ALL_PYTHONS,
99
ALL_VERSIONS,
10+
BATCHTIME_DAY,
1011
BATCHTIME_WEEK,
1112
C_EXTS,
1213
CPYTHONS,
@@ -126,7 +127,7 @@ def create_free_threaded_variants() -> list[BuildVariant]:
126127
def create_encryption_variants() -> list[BuildVariant]:
127128
variants = []
128129
tags = ["encryption_tag"]
129-
batchtime = BATCHTIME_WEEK
130+
batchtime = BATCHTIME_DAY
130131

131132
def get_encryption_expansions(encryption):
132133
expansions = dict(TEST_NAME="encryption")
@@ -183,7 +184,7 @@ def create_load_balancer_variants():
183184
tasks,
184185
"Load Balancer",
185186
host=DEFAULT_HOST,
186-
batchtime=BATCHTIME_WEEK,
187+
batchtime=BATCHTIME_DAY,
187188
expansions=expansions,
188189
)
189190
]
@@ -226,7 +227,7 @@ def create_enterprise_auth_variants():
226227

227228
def create_pyopenssl_variants():
228229
base_name = "PyOpenSSL"
229-
batchtime = BATCHTIME_WEEK
230+
batchtime = BATCHTIME_DAY
230231
expansions = dict(SUB_TEST_NAME="pyopenssl")
231232
variants = []
232233

@@ -300,12 +301,8 @@ def create_stable_api_variants():
300301
def create_green_framework_variants():
301302
variants = []
302303
host = DEFAULT_HOST
303-
for framework in ["eventlet", "gevent"]:
304+
for framework in ["gevent"]:
304305
tasks = [".test-standard .sync"]
305-
if framework == "eventlet":
306-
# Eventlet has issues with dnspython > 2.0 and newer versions of CPython
307-
# https://jira.mongodb.org/browse/PYTHON-5284
308-
tasks = [".test-standard .python-3.9 .sync"]
309306
expansions = dict(GREEN_FRAMEWORK=framework)
310307
display_name = get_variant_name(f"Green {framework.capitalize()}", host)
311308
variant = create_variant(tasks, display_name, host=host, expansions=expansions)
@@ -352,7 +349,7 @@ def create_oidc_auth_variants():
352349
tasks,
353350
get_variant_name("Auth OIDC", host),
354351
host=host,
355-
batchtime=BATCHTIME_WEEK,
352+
batchtime=BATCHTIME_DAY,
356353
)
357354
)
358355
# Add a specific local test to run on PRs.
@@ -364,7 +361,7 @@ def create_oidc_auth_variants():
364361
get_variant_name("Auth OIDC Local", host),
365362
tags=["pr"],
366363
host=host,
367-
batchtime=BATCHTIME_WEEK,
364+
batchtime=BATCHTIME_DAY,
368365
)
369366
)
370367
return variants
@@ -429,9 +426,9 @@ def create_coverage_report_variants():
429426

430427
def create_kms_variants():
431428
tasks = []
432-
tasks.append(EvgTaskRef(name="test-gcpkms", batchtime=BATCHTIME_WEEK))
429+
tasks.append(EvgTaskRef(name="test-gcpkms", batchtime=BATCHTIME_DAY))
433430
tasks.append("test-gcpkms-fail")
434-
tasks.append(EvgTaskRef(name="test-azurekms", batchtime=BATCHTIME_WEEK))
431+
tasks.append(EvgTaskRef(name="test-azurekms", batchtime=BATCHTIME_DAY))
435432
tasks.append("test-azurekms-fail")
436433
return [create_variant(tasks, "KMS", host=HOSTS["debian11"])]
437434

@@ -446,9 +443,7 @@ def create_backport_pr_variants():
446443

447444
def create_perf_variants():
448445
host = HOSTS["perf"]
449-
return [
450-
create_variant([".perf"], "Performance Benchmarks", host=host, batchtime=BATCHTIME_WEEK)
451-
]
446+
return [create_variant([".perf"], "Performance Benchmarks", host=host, batchtime=BATCHTIME_DAY)]
452447

453448

454449
def create_aws_auth_variants():
@@ -482,7 +477,7 @@ def create_no_server_variants():
482477

483478

484479
def create_alternative_hosts_variants():
485-
batchtime = BATCHTIME_WEEK
480+
batchtime = BATCHTIME_DAY
486481
variants = []
487482

488483
host = HOSTS["rhel7"]

.evergreen/scripts/generate_config_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
ALL_PYTHONS = CPYTHONS + PYPYS
2828
MIN_MAX_PYTHON = [CPYTHONS[0], CPYTHONS[-2]]
2929
BATCHTIME_WEEK = 10080
30+
BATCHTIME_DAY = 1440
3031
AUTH_SSLS = [("auth", "ssl"), ("noauth", "ssl"), ("noauth", "nossl")]
3132
TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"]
3233
C_EXTS = ["without_ext", "with_ext"]

.evergreen/scripts/run_tests.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,7 @@ def handle_perf(start_time: datetime):
6767

6868

6969
def handle_green_framework() -> None:
70-
if GREEN_FRAMEWORK == "eventlet":
71-
import eventlet
72-
73-
# https://github.com/eventlet/eventlet/issues/401
74-
eventlet.sleep()
75-
eventlet.monkey_patch()
76-
elif GREEN_FRAMEWORK == "gevent":
70+
if GREEN_FRAMEWORK == "gevent":
7771
from gevent import monkey
7872

7973
monkey.patch_all()

.evergreen/scripts/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def get_test_options(
104104
parser.add_argument(
105105
"--green-framework",
106106
nargs=1,
107-
choices=["eventlet", "gevent"],
107+
choices=["gevent"],
108108
help="Optional green framework to test against.",
109109
)
110110
parser.add_argument(

doc/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ PyMongo 4.16 brings a number of changes including:
99
- Removed invalid documents from :class:`bson.errors.InvalidDocument` error messages as
1010
doing so may leak sensitive user data.
1111
Instead, invalid documents are stored in :attr:`bson.errors.InvalidDocument.document`.
12+
- Removed support for Eventlet.
13+
Eventlet is actively being sunset by its maintainers and has compatibility issues with PyMongo's dnspython dependency.
1214

1315
Changes in Version 4.15.1 (2025/09/16)
1416
--------------------------------------

pymongo/asynchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ async def _raise_connection_failure(self, error: BaseException) -> NoReturn:
628628
# signals and throws KeyboardInterrupt into the current frame on the
629629
# main thread.
630630
#
631-
# But in Gevent and Eventlet, the polling mechanism (epoll, kqueue,
631+
# But in Gevent, the polling mechanism (epoll, kqueue,
632632
# ..) is called in Python code, which experiences the signal as a
633633
# KeyboardInterrupt from the start, rather than as an initial
634634
# socket.error, so we catch that, close the socket, and reraise it.

pymongo/pool_shared.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,11 @@ def _raise_connection_failure(
138138
msg = msg_prefix + msg
139139
if "configured timeouts" not in msg:
140140
msg += format_timeout_details(timeout_details)
141-
if isinstance(error, socket.timeout):
142-
raise NetworkTimeout(msg) from error
143-
elif isinstance(error, SSLErrors) and "timed out" in str(error):
144-
# Eventlet does not distinguish TLS network timeouts from other
145-
# SSLErrors (https://github.com/eventlet/eventlet/issues/692).
146-
# Luckily, we can work around this limitation because the phrase
147-
# 'timed out' appears in all the timeout related SSLErrors raised.
141+
if (
142+
isinstance(error, socket.timeout)
143+
or isinstance(error, SSLErrors)
144+
and "timed out" in str(error)
145+
):
148146
raise NetworkTimeout(msg) from error
149147
else:
150148
raise AutoReconnect(msg) from error

pymongo/synchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def _raise_connection_failure(self, error: BaseException) -> NoReturn:
626626
# signals and throws KeyboardInterrupt into the current frame on the
627627
# main thread.
628628
#
629-
# But in Gevent and Eventlet, the polling mechanism (epoll, kqueue,
629+
# But in Gevent, the polling mechanism (epoll, kqueue,
630630
# ..) is called in Python code, which experiences the signal as a
631631
# KeyboardInterrupt from the start, rather than as an initial
632632
# socket.error, so we catch that, close the socket, and reraise it.

0 commit comments

Comments
 (0)