Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6f8686f
PYTHON-6123 Transactions unified test error-labels-blockConnection is…
NoahStapp Nov 9, 2026
ce09d45
PYTHON-6228 Enable ruff rules UP007 and UP045 to use | instead of Uni…
NoahStapp Nov 9, 2026
c5e6a2f
PYTHON-6228 Ignore for git blame (#3188)
NoahStapp Nov 9, 2026
bc683fc
PYTHON-6230 Enable ruff rule UP041 to unify TimeoutErrors (#3185)
NoahStapp Nov 9, 2026
4a45af5
PYTHON-5959 Drop prefixPreview, suffixPreview, and substringPreview A…
blink1073 Nov 9, 2026
3319cf4
PYTHON-6226 AsyncMongoClient stays stuck in ReplicaSetNoPrimary after…
blink1073 Nov 9, 2026
16d94e2
PYTHON-6236 Enable ruff rule B905 for clearer zip() calls (#3190)
NoahStapp Nov 9, 2026
9805a64
DRIVERS-3728 Allow mongodl to download MongoDB on Ubuntu 26.04 GitHub…
blink1073 Nov 10, 2026
d0dbf32
PYTHON-6048 / PYTHON-6252 Add ASan/UBSan sanitizer tests and fix C bu…
blink1073 Nov 10, 2026
e9b5e27
PYTHON-6232 Use a supported macOS runner for wheel builds (#3196)
aclark4life Nov 10, 2026
3e95982
PYTHON-5964 Adopt ruff 0.17 default rule set in addition to existing …
NoahStapp Nov 10, 2026
703e14e
PYTHON-6238 Keep ruff BLE rules disabled (#3198)
NoahStapp Nov 10, 2026
b764ffb
PYTHON-6254 Use Ubuntu 24 for i686 wheel build jobs (#3197)
NoahStapp Nov 10, 2026
7be3649
PYTHON-6240 Enable ruff LOG rules (#3200)
NoahStapp Nov 10, 2026
95ca549
PYTHON-6241 Enable ruff PERF rules (#3201)
NoahStapp Nov 10, 2026
962987b
PYTHON-6242 Enable ruff PYI rules (#3202)
NoahStapp Nov 11, 2026
e11cd0b
PYTHON-6236 Ignore for git blame (#3192)
NoahStapp Nov 11, 2026
ffdd234
PYTHON-6239 Enable ruff FURB rules (#3199)
NoahStapp Nov 11, 2026
4f1b5ac
PYTHON-6249 Enable ruff D rules (#3209)
NoahStapp Nov 11, 2026
f349ba4
PYTHON-6246 Enable ruff FA rules (#3206)
NoahStapp Nov 11, 2026
e767249
PYTHON-6243 Enable ruff TC rules (#3203)
NoahStapp Nov 11, 2026
131f4d7
PYTHON-6244 Enable ruff TRY rules (#3204)
NoahStapp Nov 11, 2026
4569bb8
PYTHON-6250 Enable ruff N rules (#3210)
NoahStapp Nov 11, 2026
84ccf88
PYTHON-6247 Enable ruff ISC rules (#3207)
NoahStapp Nov 11, 2026
48b6246
PYTHON-6248 Enable ruff FLY rules (#3208)
NoahStapp Nov 11, 2026
44506bb
PYTHON-6258 Enable ruff TC001 rule (#3211)
NoahStapp Nov 11, 2026
35f60bc
PYTHON-6178 Grow the BSON fuzz corpus from nightly harvests
blink1073 Nov 11, 2026
c1cc665
[Spec Resync] 11-09-2026 (#3189)
mongodb-drivers-pr-bot[bot] Nov 11, 2026
b4773a9
Automation: Update uv.lock (#3193)
mongodb-drivers-pr-bot[bot] Nov 11, 2026
c836b24
Bump astral-sh/setup-uv from 10.3.2 to 10.3.3 in the actions group (#…
dependabot[bot] Nov 11, 2026
577c271
cleanup and address review
blink1073 Nov 12, 2026
042704f
add pr script
blink1073 Nov 12, 2026
5a97ce1
rename script
blink1073 Nov 12, 2026
7ed2b73
address review
Nov 12, 2026
c582b65
PYTHON-6259 Enable ruff TC003 rule (#3212)
NoahStapp Nov 12, 2026
8dba39c
PYTHON-6245 Enable ruff INT rules (#3205)
NoahStapp Nov 12, 2026
c337de3
PYTHON-6263 Remove the blacken-docs pre-commit hook (#3214)
aclark4life Nov 12, 2026
ccc82a2
PYTHON-6260 Opt into all ruff TC rules (#3216)
NoahStapp Nov 12, 2026
0aaa643
Merge remote-tracking branch 'upstream/main' into PYTHON-6178
Nov 12, 2026
a5973bb
remove workaround
Nov 12, 2026
e2b404b
merge from main
Nov 12, 2026
2d8ba71
Regenerate corrupted evergreen configs; fix ruff ISC004
Nov 12, 2026
cf42e7f
Dedup identical candidates within a harvest run
Nov 12, 2026
31ad1a2
PYTHON-6261 Opt into ruff D rules for whitespace and escapes (#3213)
NoahStapp Nov 12, 2026
56e6b44
PYTHON-6267 Prep 4.20.0 release (#3217)
aclark4life Nov 12, 2026
0206d41
PYTHON-6271 BUMP 4.21.0.dev0 (#3219)
aclark4life Nov 12, 2026
f6b84ce
PYTHON-6262 getMore retries and multi-mongos retryable writes fail in…
blink1073 Nov 13, 2026
095b462
PYTHON-6262 Move changelog entry to 4.20.1 (#3221)
blink1073 Nov 13, 2026
acf9b1b
PYTHON-6255 Update pinned drivers-evergreen-tools to v1.6.0 to comply…
blink1073 Nov 13, 2026
e4e83bb
PYTHON-6275 Enable all ruff PERF rules (#3224)
NoahStapp Nov 13, 2026
79660f4
Bump the actions group with 2 updates (#3220)
dependabot[bot] Nov 16, 2026
ae680ba
PYTHON-6185 Migrate macOS 14 tests to macOS 15 (#3228)
blink1073 Nov 16, 2026
0b9414b
PYTHON-6273 Let Dependabot fully manage uv.lock updates (#3223)
blink1073 Nov 16, 2026
39338eb
Merge remote-tracking branch 'upstream/main' into PYTHON-6178
Nov 16, 2026
c31c9f5
address review
Nov 16, 2026
75f3194
Rename harvest to capture; keep nightly fuzzing off PRs, manually pat…
Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,19 @@ tasks:
TEST_NAME: fuzz
SUB_TEST_NAME: fuzz
UV_PYTHON: "3.13"
- command: subprocess.exec
params:
binary: bash
args:
- .evergreen/scripts/capture-fuzz-corpus.sh
working_dir: src
include_expansions_in_env:
- FUZZ_CORPUS_MAX_UNITS
- FUZZ_CORPUS_MAX_UNIT_BYTES
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
type: test
tags: [fuzz, fuzz-nightly]

# Getdata tests
Expand Down Expand Up @@ -2844,6 +2857,22 @@ tasks:
- func: send dashboard data
tags: [perf]

# Sanitizer tests
- name: test-sanitizer
commands:
- func: run server
vars:
AUTH: noauth
SSL: nossl
TOPOLOGY: standalone
- func: run tests
vars:
AUTH: noauth
SSL: nossl
TOPOLOGY: standalone
TEST_NAME: sanitizer
tags: [sanitizer, pr]

# Search index tests
- name: test-search-index-helpers
commands:
Expand Down Expand Up @@ -4816,29 +4845,6 @@ tasks:
- sync
- free-threaded

# String query preview tests
- name: test-string-query-preview-v8.2-python3.15-noauth-ssl-replica-set
commands:
- func: run server
vars:
AUTH: noauth
SSL: ssl
TOPOLOGY: replica_set
VERSION: "8.2"
- func: run tests
vars:
AUTH: noauth
SSL: ssl
TOPOLOGY: replica_set
VERSION: "8.2"
UV_PYTHON: "3.15"
tags:
- test-string-query-preview
- server-8.2
- python-3.15
- replica_set-noauth-ssl
- noauth

# Test non standard tests
- name: test-non-standard-v4.4-python3.12-noauth-ssl-replica-set
commands:
Expand Down
39 changes: 22 additions & 17 deletions .evergreen/generated_configs/variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ buildvariants:
- name: .auth-aws !.auth-aws-web-identity !.auth-aws-ec2
display_name: Auth AWS macOS
run_on:
- macos-14
- macos-15-amd64
tags: [pr]
- name: auth-aws-ecs-ubuntu-24
tasks:
Expand Down Expand Up @@ -186,7 +186,6 @@ buildvariants:
- name: encryption-rhel8
tasks:
- name: .test-non-standard !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption RHEL8
run_on:
- rhel8.10-small
Expand All @@ -198,10 +197,9 @@ buildvariants:
tasks:
- name: .test-non-standard !.cov !.python-3.15t
- name: .test-non-standard-no-cov !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption macOS
run_on:
- macos-14
- macos-15-amd64
batchtime: 1440
expansions:
TEST_NAME: encryption
Expand All @@ -210,7 +208,6 @@ buildvariants:
tasks:
- name: .test-non-standard !.cov !.python-3.15t
- name: .test-non-standard-no-cov !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption Win64
run_on:
- windows-2022-latest-small
Expand All @@ -221,7 +218,6 @@ buildvariants:
- name: encryption-crypt_shared-rhel8
tasks:
- name: .test-non-standard !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption crypt_shared RHEL8
run_on:
- rhel8.10-small
Expand All @@ -234,10 +230,9 @@ buildvariants:
tasks:
- name: .test-non-standard !.cov !.python-3.15t
- name: .test-non-standard-no-cov !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption crypt_shared macOS
run_on:
- macos-14
- macos-15-amd64
batchtime: 1440
expansions:
TEST_NAME: encryption
Expand All @@ -247,7 +242,6 @@ buildvariants:
tasks:
- name: .test-non-standard !.cov !.python-3.15t
- name: .test-non-standard-no-cov !.python-3.15t
- name: .test-string-query-preview
display_name: Encryption crypt_shared Win64
run_on:
- windows-2022-latest-small
Expand Down Expand Up @@ -304,7 +298,7 @@ buildvariants:
- name: .test-standard-auth .auth !.free-threaded
display_name: Auth Enterprise macOS
run_on:
- macos-14
- macos-15-amd64
expansions:
TEST_NAME: enterprise_auth
AUTH: auth
Expand Down Expand Up @@ -448,7 +442,7 @@ buildvariants:
- name: .ocsp-rsa !.ocsp-staple .4.4
display_name: OCSP macOS
run_on:
- macos-14
- macos-15-amd64
batchtime: 10080

# Oidc auth tests
Expand All @@ -474,7 +468,7 @@ buildvariants:
- name: "!.auth_oidc_remote .auth_oidc"
display_name: Auth OIDC macOS
run_on:
- macos-14
- macos-15-amd64
batchtime: 1440
- name: auth-oidc-win64
tasks:
Expand Down Expand Up @@ -510,7 +504,7 @@ buildvariants:
- name: .test-standard !.python-3.15t .async .replica_set-noauth-ssl
display_name: PyOpenSSL macOS
run_on:
- macos-14
- macos-15-amd64
batchtime: 1440
expansions:
SUB_TEST_NAME: pyopenssl
Expand All @@ -536,6 +530,17 @@ buildvariants:
SUB_TEST_NAME: pyopenssl
tags: [pr]

# Sanitizer tests
- name: sanitizer-rhel8
tasks:
- name: .sanitizer
display_name: Sanitizer RHEL8
run_on:
- rhel8.10-large
expansions:
VERSION: "9.0"
tags: [pr]

# Search index tests
- name: search-index-helpers-rhel8
tasks:
Expand Down Expand Up @@ -672,7 +677,7 @@ buildvariants:
- name: .test-standard
display_name: "* Test macOS"
run_on:
- macos-14
- macos-15-amd64
tags: [standard-non-linux]
- name: test-macos-arm64
tasks:
Expand All @@ -684,7 +689,7 @@ buildvariants:
- name: .test-standard .server-latest
display_name: "* Test macOS Arm64"
run_on:
- macos-14-arm64
- macos-15-arm64
tags: [standard-non-linux]
- name: test-win64
tasks:
Expand Down Expand Up @@ -727,14 +732,14 @@ buildvariants:
- name: .test-numpy
display_name: Test Numpy macOS
run_on:
- macos-14
- macos-15-amd64
tags: [binary, vector]
- name: test-numpy-macos-arm64
tasks:
- name: .test-numpy
display_name: Test Numpy macOS Arm64
run_on:
- macos-14-arm64
- macos-15-arm64
tags: [binary, vector]
- name: test-numpy-win64
tasks:
Expand Down
32 changes: 32 additions & 0 deletions .evergreen/scripts/capture-fuzz-corpus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# PYTHON-6178: capture coverage-increasing inputs from a fuzz run and open
# an automated PR growing fuzz/corpus/. Runs as the last command of the
# nightly "fuzz" task, while the scratch corpus exists; manual
# `evergreen patch --variant fuzz-rhel8 --task fuzz` runs capture too.
set -eu

# Same environment as just.sh: venv on PATH for a modern Python.
. "$(dirname "${BASH_SOURCE:-$0}")/setup-dev-env.sh"

# No new units means no PR, and the github secrets flow is never touched.
uv run --no-sync python fuzz/capture_corpus.py
if [ -z "$(ls -A fuzz-scratch/capture 2>/dev/null || true)" ]; then
echo "No new fuzz corpus units; nothing to do."
exit 0
fi

# A unit found by a later target never ran through the earlier ones, so
# replay every unit through all targets before publishing.
replay=(fuzz-scratch/capture/*)
for target in fuzz_decode fuzz_decode_all fuzz_is_valid; do
echo "Replaying captured units against ${target}..."
if ! uv run --no-sync python "fuzz/${target}.py" "${replay[@]}" \
-artifact_prefix="$PWD/fuzz-scratch/" -atheris_runs="${#replay[@]}"
then
echo "Captured unit fails ${target}; no corpus PR." >&2
exit 1
fi
done

bash .evergreen/scripts/create-fuzz-corpus-pr.sh \
fuzz-scratch/capture fuzz-scratch/capture-summary.md
8 changes: 4 additions & 4 deletions .evergreen/scripts/configure-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ fi
# Add the latest MongoDB toolchain bin dir to PATH if it exists, so that hosts
# with an old system Python (e.g. RHEL8's 3.6) still get a modern interpreter
# for tool installs like `uv tool install rust-just`. It goes after
# PYMONGO_BIN_DIR so the pinned uv (installed there by setup-uv.py) takes
# precedence over the toolchain's uv.
# PYMONGO_BIN_DIR so the project's uv takes precedence.
if [ "Windows_NT" = "${OS:-}" ]; then
_toolchain_bin="/cygdrive/c/Python/Current/Scripts"
elif [ "$(uname -s)" == "Darwin" ]; then
Expand Down Expand Up @@ -106,8 +105,9 @@ if [ "$DRIVERS_TOOLS" = "$PROJECT_DIRECTORY/drivers-evergreen-tools" ]; then

# Write a uv config boundary into the submodule: it is vendored inside this
# project, so uv run by the tools' own scripts would otherwise walk up to
# pyproject.toml and enforce our required-version pin. Write-if-absent, so an
# upstream uv.toml fails the submodule update loudly instead of being clobbered.
# pyproject.toml and apply this project's [tool.uv] settings.
# Write-if-absent, so an upstream uv.toml fails the submodule update loudly
# instead of being clobbered.
if [ -d "${DRIVERS_TOOLS}" ] && [ ! -f "${DRIVERS_TOOLS}/uv.toml" ]; then
cat <<EOT > "${DRIVERS_TOOLS}/uv.toml"
# Written by mongo-python-driver to stop uv's config discovery here; see
Expand Down
31 changes: 31 additions & 0 deletions .evergreen/scripts/create-fuzz-corpus-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -eu

# Open (or update) the automated pull request that grows fuzz/corpus/
# with freshly captured units. Arguments: 1 = captured units directory,
# 2 = capture summary markdown to use as the PR body.

capture_dir="$1"
summary_file="$2"
today="$(date '+%m-%d-%Y')"

# Shared github-app authentication, git branch and PR plumbing.
# shellcheck disable=SC1091
. "$(dirname "${BASH_SOURCE[0]}")/github-pr-util.sh"

acquire_github_token

echo "Creating the git checkout..."
branch="fuzz-corpus-${today}"
prepare_bot_branch "$branch"

mkdir -p fuzz/corpus
cp "$capture_dir"/* fuzz/corpus/
if ! stage_and_commit "PYTHON-6178 Grow the BSON fuzz corpus (${today})" fuzz/corpus; then
echo "No new corpus units to commit; skipping PR creation."
exit 0
fi
echo "Creating the git checkout... done."

push_branch "$branch"
create_or_update_pr "$branch" "[Fuzz Corpus] ${today}" "$summary_file"
Loading
Loading