Skip to content

Commit 8a93d6c

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver into PYTHON-3152
2 parents 2e2fee4 + 448a494 commit 8a93d6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+316
-397
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 24 additions & 32 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.9
77
run_on:
88
- rhel79-small
9-
batchtime: 10080
9+
batchtime: 1440
1010
expansions:
1111
VERSION: "5.0"
1212
PYTHON_VERSION: "3.9"
@@ -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"
@@ -183,7 +183,7 @@ buildvariants:
183183
display_name: Encryption RHEL8
184184
run_on:
185185
- rhel87-small
186-
batchtime: 10080
186+
batchtime: 1440
187187
expansions:
188188
TEST_NAME: encryption
189189
tags: [encryption_tag]
@@ -193,7 +193,7 @@ buildvariants:
193193
display_name: Encryption macOS
194194
run_on:
195195
- macos-14
196-
batchtime: 10080
196+
batchtime: 1440
197197
expansions:
198198
TEST_NAME: encryption
199199
tags: [encryption_tag]
@@ -203,7 +203,7 @@ buildvariants:
203203
display_name: Encryption Win64
204204
run_on:
205205
- windows-64-vsMulti-small
206-
batchtime: 10080
206+
batchtime: 1440
207207
expansions:
208208
TEST_NAME: encryption
209209
tags: [encryption_tag]
@@ -214,7 +214,7 @@ buildvariants:
214214
display_name: Encryption crypt_shared RHEL8
215215
run_on:
216216
- rhel87-small
217-
batchtime: 10080
217+
batchtime: 1440
218218
expansions:
219219
TEST_NAME: encryption
220220
TEST_CRYPT_SHARED: "true"
@@ -225,7 +225,7 @@ buildvariants:
225225
display_name: Encryption crypt_shared macOS
226226
run_on:
227227
- macos-14
228-
batchtime: 10080
228+
batchtime: 1440
229229
expansions:
230230
TEST_NAME: encryption
231231
TEST_CRYPT_SHARED: "true"
@@ -236,7 +236,7 @@ buildvariants:
236236
display_name: Encryption crypt_shared Win64
237237
run_on:
238238
- windows-64-vsMulti-small
239-
batchtime: 10080
239+
batchtime: 1440
240240
expansions:
241241
TEST_NAME: encryption
242242
TEST_CRYPT_SHARED: "true"
@@ -247,7 +247,7 @@ buildvariants:
247247
display_name: Encryption PyOpenSSL RHEL8
248248
run_on:
249249
- rhel87-small
250-
batchtime: 10080
250+
batchtime: 1440
251251
expansions:
252252
TEST_NAME: encryption
253253
SUB_TEST_NAME: pyopenssl
@@ -321,14 +321,6 @@ buildvariants:
321321
tags: []
322322

323323
# Green framework tests
324-
- name: green-eventlet-rhel8
325-
tasks:
326-
- name: .test-standard .python-3.9 .sync
327-
display_name: Green Eventlet RHEL8
328-
run_on:
329-
- rhel87-small
330-
expansions:
331-
GREEN_FRAMEWORK: eventlet
332324
- name: green-gevent-rhel8
333325
tasks:
334326
- name: .test-standard .sync
@@ -350,10 +342,10 @@ buildvariants:
350342
- name: kms
351343
tasks:
352344
- name: test-gcpkms
353-
batchtime: 10080
345+
batchtime: 1440
354346
- name: test-gcpkms-fail
355347
- name: test-azurekms
356-
batchtime: 10080
348+
batchtime: 1440
357349
- name: test-azurekms-fail
358350
display_name: KMS
359351
run_on:
@@ -370,7 +362,7 @@ buildvariants:
370362
display_name: Load Balancer
371363
run_on:
372364
- rhel87-small
373-
batchtime: 10080
365+
batchtime: 1440
374366
expansions:
375367
TEST_NAME: load_balancer
376368

@@ -444,29 +436,29 @@ buildvariants:
444436
display_name: Auth OIDC Ubuntu-22
445437
run_on:
446438
- ubuntu2204-small
447-
batchtime: 10080
439+
batchtime: 1440
448440
- name: auth-oidc-local-ubuntu-22
449441
tasks:
450442
- name: "!.auth_oidc_remote .auth_oidc"
451443
display_name: Auth OIDC Local Ubuntu-22
452444
run_on:
453445
- ubuntu2204-small
454-
batchtime: 10080
446+
batchtime: 1440
455447
tags: [pr]
456448
- name: auth-oidc-macos
457449
tasks:
458450
- name: "!.auth_oidc_remote .auth_oidc"
459451
display_name: Auth OIDC macOS
460452
run_on:
461453
- macos-14
462-
batchtime: 10080
454+
batchtime: 1440
463455
- name: auth-oidc-win64
464456
tasks:
465457
- name: "!.auth_oidc_remote .auth_oidc"
466458
display_name: Auth OIDC Win64
467459
run_on:
468460
- windows-64-vsMulti-small
469-
batchtime: 10080
461+
batchtime: 1440
470462

471463
# Perf tests
472464
- name: performance-benchmarks
@@ -475,7 +467,7 @@ buildvariants:
475467
display_name: Performance Benchmarks
476468
run_on:
477469
- rhel90-dbx-perf-large
478-
batchtime: 10080
470+
batchtime: 1440
479471

480472
# Pyopenssl tests
481473
- name: pyopenssl-rhel8
@@ -485,7 +477,7 @@ buildvariants:
485477
display_name: PyOpenSSL RHEL8
486478
run_on:
487479
- rhel87-small
488-
batchtime: 10080
480+
batchtime: 1440
489481
expansions:
490482
SUB_TEST_NAME: pyopenssl
491483
- name: pyopenssl-macos
@@ -495,7 +487,7 @@ buildvariants:
495487
display_name: PyOpenSSL macOS
496488
run_on:
497489
- rhel87-small
498-
batchtime: 10080
490+
batchtime: 1440
499491
expansions:
500492
SUB_TEST_NAME: pyopenssl
501493
- name: pyopenssl-win64
@@ -505,7 +497,7 @@ buildvariants:
505497
display_name: PyOpenSSL Win64
506498
run_on:
507499
- rhel87-small
508-
batchtime: 10080
500+
batchtime: 1440
509501
expansions:
510502
SUB_TEST_NAME: pyopenssl
511503

.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[-1]]
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
@@ -68,13 +68,7 @@ def handle_perf(start_time: datetime):
6868

6969

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

8074
monkey.patch_all()

.evergreen/scripts/setup-dev-env.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,8 @@ if [ -f $HOME/.visualStudioEnv.sh ]; then
4747
SSH_TTY=1 source $HOME/.visualStudioEnv.sh
4848
set -u
4949
fi
50-
uv sync --frozen
50+
uv sync
5151

5252
echo "Setting up python environment... done."
5353

54-
# Ensure there is a pre-commit hook if there is a git checkout.
55-
if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then
56-
uv run --frozen pre-commit install
57-
fi
58-
5954
popd > /dev/null

.evergreen/scripts/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def get_test_options(
110110
parser.add_argument(
111111
"--green-framework",
112112
nargs=1,
113-
choices=["eventlet", "gevent"],
113+
choices=["gevent"],
114114
help="Optional green framework to test against.",
115115
)
116116
parser.add_argument(

.pre-commit-config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ repos:
105105
# - test/test_client.py:188: te ==> the, be, we, to
106106
args: ["-L", "fle,fo,infinit,isnt,nin,te,aks"]
107107

108-
- repo: https://github.com/astral-sh/uv-pre-commit
109-
# uv version.
110-
rev: 0.8.17
111-
hooks:
112-
- id: uv-lock
113-
114108
- repo: local
115109
hooks:
116110
- id: executable-shell
@@ -128,3 +122,14 @@ repos:
128122
language: python
129123
require_serial: true
130124
additional_dependencies: ["shrub.py>=3.10.0", "pyyaml>=6.0.2"]
125+
126+
- id: uv-lock
127+
name: uv-lock
128+
entry: uv lock
129+
language: python
130+
require_serial: true
131+
files: ^(uv\.lock|pyproject\.toml|requirements.txt|requirements/.*\.txt)$
132+
pass_filenames: false
133+
fail_fast: true
134+
additional_dependencies:
135+
- "uv>=0.8.4"

0 commit comments

Comments
 (0)