diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index f2987d890f..e54e6c5f1f 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -3321,505 +3321,437 @@ tasks: - free-threaded # Standard tests - - name: test-standard-v4.2-python3.11-sync-noauth-ssl-replica-set + - name: test-standard-v4.4-python3.12-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" - TOOLCHAIN_VERSION: "3.11" + VERSION: "4.4" + TOOLCHAIN_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - - server-4.2 - - python-3.11 + - server-4.4 + - python-3.12 - replica_set-noauth-ssl - sync - - name: test-standard-v4.2-python3.14-sync-noauth-ssl-replica-set + - name: test-standard-v4.4-python3.13-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" - TOOLCHAIN_VERSION: "3.14" - TEST_NAME: default_sync + VERSION: "4.4" + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_async tags: - test-standard - - server-4.2 - - python-3.14 + - server-4.4 + - python-3.13 - replica_set-noauth-ssl - - sync - - name: test-standard-v4.2-python3.12-sync-auth-ssl-sharded-cluster + - async + - name: test-standard-v4.4-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_sync + VERSION: "4.4" + TOOLCHAIN_VERSION: "3.14" + TEST_NAME: default_async tags: - test-standard - - server-4.2 - - python-3.12 + - server-4.4 + - python-3.14 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v4.2-pypy3.11-sync-auth-ssl-sharded-cluster + - async + - name: test-standard-v4.4-python3.14t-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" - TOOLCHAIN_VERSION: pypy3.11 + VERSION: "4.4" + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_sync tags: - test-standard - - server-4.2 - - python-pypy3.11 + - server-4.4 + - python-3.14t - sharded_cluster-auth-ssl - sync - - pypy - - name: test-standard-v4.2-python3.10-sync-noauth-nossl-standalone-min-deps + - free-threaded + - name: test-standard-v4.4-python3.10-sync-noauth-nossl-standalone-min-deps commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" TEST_NAME: default_sync tags: - test-standard - - server-4.2 + - server-4.4 - python-3.10 - standalone-noauth-nossl - sync - - name: test-standard-v4.2-python3.14t-sync-noauth-nossl-standalone + - name: test-standard-v4.4-python3.11-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" - TOOLCHAIN_VERSION: 3.14t - TEST_NAME: default_sync + VERSION: "4.4" + TOOLCHAIN_VERSION: "3.11" + TEST_NAME: default_async tags: - test-standard - - server-4.2 - - python-3.14t + - server-4.4 + - python-3.11 - standalone-noauth-nossl - - sync - - free-threaded - - name: test-standard-v4.4-python3.11-async-noauth-ssl-replica-set + - async + - name: test-standard-v5.0-python3.11-sync-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" TOOLCHAIN_VERSION: "3.11" - TEST_NAME: default_async + TEST_NAME: default_sync tags: - test-standard - - server-4.4 + - server-5.0 - python-3.11 - replica_set-noauth-ssl - - async - - name: test-standard-v4.4-python3.14-async-noauth-ssl-replica-set + - sync + - name: test-standard-v5.0-python3.12-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" - TOOLCHAIN_VERSION: "3.14" + VERSION: "5.0" + TOOLCHAIN_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - - server-4.4 - - python-3.14 + - server-5.0 + - python-3.12 - replica_set-noauth-ssl - async - - name: test-standard-v4.4-python3.12-async-auth-ssl-sharded-cluster + - name: test-standard-v5.0-python3.13-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_async + VERSION: "5.0" + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_sync tags: - test-standard - - server-4.4 - - python-3.12 + - server-5.0 + - python-3.13 - sharded_cluster-auth-ssl - - async - - name: test-standard-v4.4-pypy3.11-async-auth-ssl-sharded-cluster + - sync + - name: test-standard-v5.0-python3.14t-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" - TOOLCHAIN_VERSION: pypy3.11 + VERSION: "5.0" + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_async tags: - test-standard - - server-4.4 - - python-pypy3.11 + - server-5.0 + - python-3.14t - sharded_cluster-auth-ssl - async - - pypy - - name: test-standard-v4.4-python3.10-async-noauth-nossl-standalone-min-deps + - free-threaded + - name: test-standard-v5.0-python3.10-async-noauth-nossl-standalone-min-deps commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" TEST_NAME: default_async tags: - test-standard - - server-4.4 + - server-5.0 - python-3.10 - standalone-noauth-nossl - async - - name: test-standard-v4.4-python3.14t-async-noauth-nossl-standalone + - name: test-standard-v5.0-pypy3.11-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" - TOOLCHAIN_VERSION: 3.14t - TEST_NAME: default_async + VERSION: "5.0" + TOOLCHAIN_VERSION: pypy3.11 + TEST_NAME: default_sync tags: - test-standard - - server-4.4 - - python-3.14t + - server-5.0 + - python-pypy3.11 - standalone-noauth-nossl - - async - - free-threaded - - name: test-standard-v5.0-python3.10-sync-noauth-ssl-replica-set-min-deps + - sync + - pypy + - name: test-standard-v6.0-python3.10-sync-noauth-ssl-replica-set-min-deps commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" TEST_NAME: default_sync tags: - test-standard - - server-5.0 + - server-6.0 - python-3.10 - replica_set-noauth-ssl - sync - - name: test-standard-v5.0-python3.14t-sync-noauth-ssl-replica-set + - name: test-standard-v6.0-python3.11-async-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" - TOOLCHAIN_VERSION: 3.14t - TEST_NAME: default_sync + VERSION: "6.0" + TOOLCHAIN_VERSION: "3.11" + TEST_NAME: default_async tags: - test-standard - - server-5.0 - - python-3.14t + - server-6.0 + - python-3.11 - replica_set-noauth-ssl - - sync - - free-threaded - - name: test-standard-v5.0-python3.11-sync-auth-ssl-sharded-cluster + - async + - name: test-standard-v6.0-python3.12-sync-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" - TOOLCHAIN_VERSION: "3.11" + VERSION: "6.0" + TOOLCHAIN_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - - server-5.0 - - python-3.11 + - server-6.0 + - python-3.12 - sharded_cluster-auth-ssl - sync - - name: test-standard-v5.0-python3.14-sync-auth-ssl-sharded-cluster + - name: test-standard-v6.0-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" - TOOLCHAIN_VERSION: "3.14" - TEST_NAME: default_sync + VERSION: "6.0" + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_async tags: - test-standard - - server-5.0 - - python-3.14 + - server-6.0 + - python-3.13 - sharded_cluster-auth-ssl - - sync - - name: test-standard-v5.0-python3.13-sync-noauth-nossl-standalone + - async + - name: test-standard-v6.0-python3.14-sync-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" - TOOLCHAIN_VERSION: "3.13" + VERSION: "6.0" + TOOLCHAIN_VERSION: "3.14" TEST_NAME: default_sync tags: - test-standard - - server-5.0 - - python-3.13 + - server-6.0 + - python-3.14 - standalone-noauth-nossl - sync - - name: test-standard-v6.0-python3.10-async-noauth-ssl-replica-set-min-deps + - name: test-standard-v6.0-pypy3.11-async-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: "6.0" - TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set + SSL: nossl + TOPOLOGY: standalone VERSION: "6.0" - TEST_MIN_DEPS: "1" - TOOLCHAIN_VERSION: "3.10" + TOOLCHAIN_VERSION: pypy3.11 TEST_NAME: default_async tags: - test-standard - server-6.0 - - python-3.10 - - replica_set-noauth-ssl + - python-pypy3.11 + - standalone-noauth-nossl - async - - name: test-standard-v6.0-python3.14t-async-noauth-ssl-replica-set + - pypy + - name: test-standard-v7.0-python3.10-async-noauth-ssl-replica-set-min-deps commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" + VERSION: "7.0" + TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "6.0" - TOOLCHAIN_VERSION: 3.14t + VERSION: "7.0" + TEST_MIN_DEPS: "1" + TOOLCHAIN_VERSION: "3.10" TEST_NAME: default_async tags: - test-standard - - server-6.0 - - python-3.14t + - server-7.0 + - python-3.10 - replica_set-noauth-ssl - async - - free-threaded - - name: test-standard-v6.0-python3.11-async-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - TOOLCHAIN_VERSION: "3.11" - TEST_NAME: default_async - tags: - - test-standard - - server-6.0 - - python-3.11 - - sharded_cluster-auth-ssl - - async - - name: test-standard-v6.0-python3.14-async-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - TOOLCHAIN_VERSION: "3.14" - TEST_NAME: default_async - tags: - - test-standard - - server-6.0 - - python-3.14 - - sharded_cluster-auth-ssl - - async - - name: test-standard-v6.0-python3.13-async-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - TOOLCHAIN_VERSION: "3.13" - TEST_NAME: default_async - tags: - - test-standard - - server-6.0 - - python-3.13 - - standalone-noauth-nossl - - async - - name: test-standard-v7.0-python3.13-sync-noauth-ssl-replica-set + - name: test-standard-v7.0-pypy3.11-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3833,15 +3765,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "7.0" - TOOLCHAIN_VERSION: "3.13" + TOOLCHAIN_VERSION: pypy3.11 TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-3.13 + - python-pypy3.11 - replica_set-noauth-ssl - sync - - name: test-standard-v7.0-python3.10-sync-auth-ssl-sharded-cluster-min-deps + - pypy + - name: test-standard-v7.0-python3.11-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3849,23 +3782,21 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - TEST_MIN_DEPS: "1" - TOOLCHAIN_VERSION: "3.10" + TOOLCHAIN_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-3.10 + - python-3.11 - sharded_cluster-auth-ssl - sync - - name: test-standard-v7.0-python3.14t-sync-auth-ssl-sharded-cluster + - name: test-standard-v7.0-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3879,16 +3810,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - TOOLCHAIN_VERSION: 3.14t - TEST_NAME: default_sync + TOOLCHAIN_VERSION: "3.12" + TEST_NAME: default_async tags: - test-standard - server-7.0 - - python-3.14t + - python-3.12 - sharded_cluster-auth-ssl - - sync - - free-threaded - - name: test-standard-v7.0-python3.12-sync-noauth-nossl-standalone + - async + - name: test-standard-v7.0-python3.14-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3902,15 +3832,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_sync + TOOLCHAIN_VERSION: "3.14" + TEST_NAME: default_async tags: - test-standard - server-7.0 - - python-3.12 + - python-3.14 - standalone-noauth-nossl - - sync - - name: test-standard-v7.0-pypy3.11-sync-noauth-nossl-standalone + - async + - name: test-standard-v7.0-python3.14t-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -3924,16 +3854,16 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-pypy3.11 + - python-3.14t - standalone-noauth-nossl - sync - - pypy - - name: test-standard-v8.0-python3.13-async-noauth-ssl-replica-set + - free-threaded + - name: test-standard-v8.0-python3.14-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3947,15 +3877,38 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "8.0" - TOOLCHAIN_VERSION: "3.13" + TOOLCHAIN_VERSION: "3.14" + TEST_NAME: default_sync + tags: + - test-standard + - server-8.0 + - python-3.14 + - replica_set-noauth-ssl + - sync + - name: test-standard-v8.0-pypy3.11-async-noauth-ssl-replica-set + commands: + - func: run server + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + - func: run tests + vars: + AUTH: noauth + SSL: ssl + TOPOLOGY: replica_set + VERSION: "8.0" + TOOLCHAIN_VERSION: pypy3.11 TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-3.13 + - python-pypy3.11 - replica_set-noauth-ssl - async - - name: test-standard-v8.0-python3.10-async-auth-ssl-sharded-cluster-min-deps + - pypy + - name: test-standard-v8.0-python3.10-sync-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: @@ -3972,14 +3925,14 @@ tasks: VERSION: "8.0" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" - TEST_NAME: default_async + TEST_NAME: default_sync tags: - test-standard - server-8.0 - python-3.10 - sharded_cluster-auth-ssl - - async - - name: test-standard-v8.0-python3.14t-async-auth-ssl-sharded-cluster + - sync + - name: test-standard-v8.0-python3.11-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3993,16 +3946,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TOOLCHAIN_VERSION: 3.14t + TOOLCHAIN_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-3.14t + - python-3.11 - sharded_cluster-auth-ssl - async - - free-threaded - - name: test-standard-v8.0-python3.12-async-noauth-nossl-standalone + - name: test-standard-v8.0-python3.13-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -4016,15 +3968,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_async + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_sync tags: - test-standard - server-8.0 - - python-3.12 + - python-3.13 - standalone-noauth-nossl - - async - - name: test-standard-v8.0-pypy3.11-async-noauth-nossl-standalone + - sync + - name: test-standard-v8.0-python3.14t-async-noauth-nossl-standalone commands: - func: run server vars: @@ -4038,16 +3990,16 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-pypy3.11 + - python-3.14t - standalone-noauth-nossl - async - - pypy - - name: test-standard-latest-python3.12-async-noauth-ssl-replica-set-cov + - free-threaded + - name: test-standard-latest-python3.13-sync-noauth-ssl-replica-set-cov commands: - func: run server vars: @@ -4063,16 +4015,16 @@ tasks: TOPOLOGY: replica_set VERSION: latest COVERAGE: "1" - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_async + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_sync tags: - test-standard - server-latest - - python-3.12 + - python-3.13 - replica_set-noauth-ssl - - async + - sync - pr - - name: test-standard-latest-pypy3.11-async-noauth-ssl-replica-set + - name: test-standard-latest-python3.14t-async-noauth-ssl-replica-set-cov commands: - func: run server vars: @@ -4080,22 +4032,25 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set VERSION: latest - TOOLCHAIN_VERSION: pypy3.11 + COVERAGE: "1" + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_async tags: - test-standard - server-latest - - python-pypy3.11 + - python-3.14t - replica_set-noauth-ssl - async - - pypy - - name: test-standard-latest-python3.13-async-auth-ssl-sharded-cluster-cov + - free-threaded + - pr + - name: test-standard-latest-python3.14-sync-auth-ssl-sharded-cluster-cov commands: - func: run server vars: @@ -4111,16 +4066,39 @@ tasks: TOPOLOGY: sharded_cluster VERSION: latest COVERAGE: "1" - TOOLCHAIN_VERSION: "3.13" + TOOLCHAIN_VERSION: "3.14" + TEST_NAME: default_sync + tags: + - test-standard + - server-latest + - python-3.14 + - sharded_cluster-auth-ssl + - sync + - pr + - name: test-standard-latest-pypy3.11-async-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: latest + TOOLCHAIN_VERSION: pypy3.11 TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.13 + - python-pypy3.11 - sharded_cluster-auth-ssl - async - - pr - - name: test-standard-latest-python3.11-async-noauth-nossl-standalone-cov + - pypy + - name: test-standard-latest-python3.11-sync-noauth-nossl-standalone-cov commands: - func: run server vars: @@ -4137,15 +4115,15 @@ tasks: VERSION: latest COVERAGE: "1" TOOLCHAIN_VERSION: "3.11" - TEST_NAME: default_async + TEST_NAME: default_sync tags: - test-standard - server-latest - python-3.11 - standalone-noauth-nossl - - async + - sync - pr - - name: test-standard-latest-python3.14-async-noauth-nossl-standalone-cov + - name: test-standard-latest-python3.12-async-noauth-nossl-standalone-cov commands: - func: run server vars: @@ -4161,16 +4139,16 @@ tasks: TOPOLOGY: standalone VERSION: latest COVERAGE: "1" - TOOLCHAIN_VERSION: "3.14" + TOOLCHAIN_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.14 + - python-3.12 - standalone-noauth-nossl - async - pr - - name: test-standard-rapid-python3.12-sync-noauth-ssl-replica-set + - name: test-standard-rapid-python3.14-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -4184,15 +4162,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - TOOLCHAIN_VERSION: "3.12" - TEST_NAME: default_sync + TOOLCHAIN_VERSION: "3.14" + TEST_NAME: default_async tags: - test-standard - server-rapid - - python-3.12 + - python-3.14 - replica_set-noauth-ssl - - sync - - name: test-standard-rapid-pypy3.11-sync-noauth-ssl-replica-set + - async + - name: test-standard-rapid-python3.14t-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -4206,16 +4184,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: 3.14t TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-pypy3.11 + - python-3.14t - replica_set-noauth-ssl - sync - - pypy - - name: test-standard-rapid-python3.13-sync-auth-ssl-sharded-cluster + - free-threaded + - name: test-standard-rapid-python3.10-async-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: @@ -4223,21 +4201,46 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid + TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - TOOLCHAIN_VERSION: "3.13" + TEST_MIN_DEPS: "1" + TOOLCHAIN_VERSION: "3.10" + TEST_NAME: default_async + tags: + - test-standard + - server-rapid + - python-3.10 + - sharded_cluster-auth-ssl + - async + - name: test-standard-rapid-pypy3.11-sync-auth-ssl-sharded-cluster + commands: + - func: run server + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + - func: run tests + vars: + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster + VERSION: rapid + TOOLCHAIN_VERSION: pypy3.11 TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-3.13 + - python-pypy3.11 - sharded_cluster-auth-ssl - sync - - name: test-standard-rapid-python3.11-sync-noauth-nossl-standalone + - pypy + - name: test-standard-rapid-python3.12-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -4251,15 +4254,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - TOOLCHAIN_VERSION: "3.11" + TOOLCHAIN_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-3.11 + - python-3.12 - standalone-noauth-nossl - sync - - name: test-standard-rapid-python3.14-sync-noauth-nossl-standalone + - name: test-standard-rapid-python3.13-async-noauth-nossl-standalone commands: - func: run server vars: @@ -4273,363 +4276,277 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - TOOLCHAIN_VERSION: "3.14" - TEST_NAME: default_sync + TOOLCHAIN_VERSION: "3.13" + TEST_NAME: default_async tags: - test-standard - server-rapid - - python-3.14 + - python-3.13 - standalone-noauth-nossl - - sync + - async # Test non standard tests - - name: test-non-standard-v4.2-python3.11-noauth-ssl-replica-set + - name: test-non-standard-v4.4-python3.11-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.2" + VERSION: "4.4" TOOLCHAIN_VERSION: "3.11" tags: - test-non-standard - - server-4.2 + - server-4.4 - python-3.11 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v4.2-python3.12-auth-ssl-sharded-cluster + - name: test-non-standard-v4.4-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" TOOLCHAIN_VERSION: "3.12" tags: - test-non-standard - - server-4.2 + - server-4.4 - python-3.12 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v4.2-python3.10-noauth-nossl-standalone-min-deps + - name: test-non-standard-v4.4-python3.10-noauth-nossl-standalone-min-deps commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" tags: - test-non-standard - - server-4.2 + - server-4.4 - python-3.10 - standalone-noauth-nossl - noauth - - name: test-non-standard-v4.2-pypy3.11-noauth-nossl-standalone + - name: test-non-standard-v4.4-pypy3.11-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.2" + VERSION: "4.4" TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - - server-4.2 + - server-4.4 - python-pypy3.11 - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-v4.4-python3.14t-noauth-ssl-replica-set + - name: test-non-standard-v5.0-python3.14t-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" TOOLCHAIN_VERSION: 3.14t tags: - test-non-standard - - server-4.4 + - server-5.0 - python-3.14t - replica_set-noauth-ssl - noauth - free-threaded - - name: test-non-standard-v4.4-pypy3.11-noauth-ssl-replica-set + - name: test-non-standard-v5.0-pypy3.11-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "4.4" + VERSION: "5.0" TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - - server-4.4 + - server-5.0 - python-pypy3.11 - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-v4.4-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-v5.0-python3.14-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.4" + VERSION: "5.0" TOOLCHAIN_VERSION: "3.14" tags: - test-non-standard - - server-4.4 + - server-5.0 - python-3.14 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v4.4-python3.13-noauth-nossl-standalone + - name: test-non-standard-v5.0-python3.13-noauth-nossl-standalone commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "4.4" + VERSION: "5.0" TOOLCHAIN_VERSION: "3.13" tags: - test-non-standard - - server-4.4 + - server-5.0 - python-3.13 - standalone-noauth-nossl - noauth - - name: test-non-standard-v5.0-python3.11-noauth-ssl-replica-set + - name: test-non-standard-v6.0-python3.11-noauth-ssl-replica-set commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - VERSION: "5.0" + VERSION: "6.0" TOOLCHAIN_VERSION: "3.11" tags: - test-non-standard - - server-5.0 + - server-6.0 - python-3.11 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v5.0-python3.12-auth-ssl-sharded-cluster + - name: test-non-standard-v6.0-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" TOOLCHAIN_VERSION: "3.12" tags: - test-non-standard - - server-5.0 + - server-6.0 - python-3.12 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v5.0-pypy3.11-auth-ssl-sharded-cluster + - name: test-non-standard-v6.0-pypy3.11-auth-ssl-sharded-cluster commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "5.0" + VERSION: "6.0" TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - - server-5.0 + - server-6.0 - python-pypy3.11 - sharded_cluster-auth-ssl - auth - pypy - - name: test-non-standard-v5.0-python3.10-noauth-nossl-standalone-min-deps + - name: test-non-standard-v6.0-python3.10-noauth-nossl-standalone-min-deps commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - VERSION: "5.0" + VERSION: "6.0" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" - tags: - - test-non-standard - - server-5.0 - - python-3.10 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-v6.0-python3.14t-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: "6.0" - TOOLCHAIN_VERSION: 3.14t - tags: - - test-non-standard - - server-6.0 - - python-3.14t - - replica_set-noauth-ssl - - noauth - - free-threaded - - name: test-non-standard-v6.0-python3.14-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "6.0" - TOOLCHAIN_VERSION: "3.14" - tags: - - test-non-standard - - server-6.0 - - python-3.14 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v6.0-python3.13-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - TOOLCHAIN_VERSION: "3.13" - tags: - - test-non-standard - - server-6.0 - - python-3.13 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-v6.0-pypy3.11-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "6.0" - TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - server-6.0 - - python-pypy3.11 + - python-3.10 - standalone-noauth-nossl - noauth - - pypy - - name: test-non-standard-v7.0-python3.11-noauth-ssl-replica-set + - name: test-non-standard-v7.0-python3.14t-noauth-ssl-replica-set commands: - func: run server vars: @@ -4643,57 +4560,57 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "7.0" - TOOLCHAIN_VERSION: "3.11" + TOOLCHAIN_VERSION: 3.14t tags: - test-non-standard - server-7.0 - - python-3.11 + - python-3.14t - replica_set-noauth-ssl - noauth - - name: test-non-standard-v7.0-pypy3.11-noauth-ssl-replica-set + - free-threaded + - name: test-non-standard-v7.0-python3.14-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth + AUTH: auth SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster VERSION: "7.0" - func: run tests vars: - AUTH: noauth + AUTH: auth SSL: ssl - TOPOLOGY: replica_set + TOPOLOGY: sharded_cluster VERSION: "7.0" - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: "3.14" tags: - test-non-standard - server-7.0 - - python-pypy3.11 - - replica_set-noauth-ssl - - noauth - - pypy - - name: test-non-standard-v7.0-python3.12-auth-ssl-sharded-cluster + - python-3.14 + - sharded_cluster-auth-ssl + - auth + - name: test-non-standard-v7.0-python3.13-noauth-nossl-standalone commands: - func: run server vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone VERSION: "7.0" - func: run tests vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone VERSION: "7.0" - TOOLCHAIN_VERSION: "3.12" + TOOLCHAIN_VERSION: "3.13" tags: - test-non-standard - server-7.0 - - python-3.12 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v7.0-python3.10-noauth-nossl-standalone-min-deps + - python-3.13 + - standalone-noauth-nossl + - noauth + - name: test-non-standard-v7.0-pypy3.11-noauth-nossl-standalone commands: - func: run server vars: @@ -4701,22 +4618,21 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - TEST_MIN_DEPS: "1" - TOOLCHAIN_VERSION: "3.10" + TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - server-7.0 - - python-3.10 + - python-pypy3.11 - standalone-noauth-nossl - noauth - - name: test-non-standard-v8.0-python3.14t-noauth-ssl-replica-set + - pypy + - name: test-non-standard-v8.0-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4730,36 +4646,36 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "8.0" - TOOLCHAIN_VERSION: 3.14t + TOOLCHAIN_VERSION: "3.11" tags: - test-non-standard - server-8.0 - - python-3.14t + - python-3.11 - replica_set-noauth-ssl - noauth - - free-threaded - - name: test-non-standard-v8.0-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-v8.0-pypy3.11-noauth-ssl-replica-set commands: - func: run server vars: - AUTH: auth + AUTH: noauth SSL: ssl - TOPOLOGY: sharded_cluster + TOPOLOGY: replica_set VERSION: "8.0" - func: run tests vars: - AUTH: auth + AUTH: noauth SSL: ssl - TOPOLOGY: sharded_cluster + TOPOLOGY: replica_set VERSION: "8.0" - TOOLCHAIN_VERSION: "3.14" + TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - server-8.0 - - python-3.14 - - sharded_cluster-auth-ssl - - auth - - name: test-non-standard-v8.0-pypy3.11-auth-ssl-sharded-cluster + - python-pypy3.11 + - replica_set-noauth-ssl + - noauth + - pypy + - name: test-non-standard-v8.0-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4773,15 +4689,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: "3.12" tags: - test-non-standard - server-8.0 - - python-pypy3.11 + - python-3.12 - sharded_cluster-auth-ssl - auth - - pypy - - name: test-non-standard-v8.0-python3.13-noauth-nossl-standalone + - name: test-non-standard-v8.0-python3.10-noauth-nossl-standalone-min-deps commands: - func: run server vars: @@ -4789,42 +4704,22 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" + TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - TOOLCHAIN_VERSION: "3.13" + TEST_MIN_DEPS: "1" + TOOLCHAIN_VERSION: "3.10" tags: - test-non-standard - server-8.0 - - python-3.13 + - python-3.10 - standalone-noauth-nossl - noauth - - name: test-non-standard-latest-python3.14t-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: latest - TOOLCHAIN_VERSION: 3.14t - tags: - - test-non-standard - - server-latest - - python-3.14t - - replica_set-noauth-ssl - - noauth - - free-threaded - - name: test-non-standard-latest-pypy3.11-noauth-ssl-replica-set + - name: test-non-standard-latest-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4838,15 +4733,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: "3.11" tags: - test-non-standard - server-latest - - python-pypy3.11 + - python-3.11 - replica_set-noauth-ssl - noauth - - pypy - - name: test-non-standard-latest-python3.14-auth-ssl-sharded-cluster-cov + - name: test-non-standard-latest-python3.12-auth-ssl-sharded-cluster-cov commands: - func: run server vars: @@ -4862,16 +4756,16 @@ tasks: TOPOLOGY: sharded_cluster VERSION: latest COVERAGE: "1" - TOOLCHAIN_VERSION: "3.14" + TOOLCHAIN_VERSION: "3.12" tags: - test-non-standard - server-latest - - python-3.14 + - python-3.12 - sharded_cluster-auth-ssl - auth - pr - cov - - name: test-non-standard-latest-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-latest-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4885,15 +4779,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - TOOLCHAIN_VERSION: "3.14" + TOOLCHAIN_VERSION: "3.12" tags: - test-non-standard-no-cov - server-latest - - python-3.14 + - python-3.12 - sharded_cluster-auth-ssl - auth - pr - - name: test-non-standard-latest-python3.13-noauth-nossl-standalone + - name: test-non-standard-latest-python3.10-noauth-nossl-standalone-min-deps commands: - func: run server vars: @@ -4901,20 +4795,44 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: latest + TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone VERSION: latest - TOOLCHAIN_VERSION: "3.13" + TEST_MIN_DEPS: "1" + TOOLCHAIN_VERSION: "3.10" tags: - test-non-standard - server-latest - - python-3.13 + - python-3.10 + - standalone-noauth-nossl + - noauth + - name: test-non-standard-latest-pypy3.11-noauth-nossl-standalone + commands: + - func: run server + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + - func: run tests + vars: + AUTH: noauth + SSL: nossl + TOPOLOGY: standalone + VERSION: latest + TOOLCHAIN_VERSION: pypy3.11 + tags: + - test-non-standard + - server-latest + - python-pypy3.11 - standalone-noauth-nossl - noauth - - name: test-non-standard-rapid-python3.11-noauth-ssl-replica-set + - pypy + - name: test-non-standard-rapid-python3.14t-noauth-ssl-replica-set commands: - func: run server vars: @@ -4928,14 +4846,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - TOOLCHAIN_VERSION: "3.11" + TOOLCHAIN_VERSION: 3.14t tags: - test-non-standard - server-rapid - - python-3.11 + - python-3.14t - replica_set-noauth-ssl - noauth - - name: test-non-standard-rapid-python3.12-auth-ssl-sharded-cluster + - free-threaded + - name: test-non-standard-rapid-python3.14-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4949,37 +4868,36 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - TOOLCHAIN_VERSION: "3.12" + TOOLCHAIN_VERSION: "3.14" tags: - test-non-standard - server-rapid - - python-3.12 + - python-3.14 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-rapid-python3.10-noauth-nossl-standalone-min-deps + - name: test-non-standard-rapid-pypy3.11-auth-ssl-sharded-cluster commands: - func: run server vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: rapid - TEST_MIN_DEPS: "1" - func: run tests vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone + AUTH: auth + SSL: ssl + TOPOLOGY: sharded_cluster VERSION: rapid - TEST_MIN_DEPS: "1" - TOOLCHAIN_VERSION: "3.10" + TOOLCHAIN_VERSION: pypy3.11 tags: - test-non-standard - server-rapid - - python-3.10 - - standalone-noauth-nossl - - noauth - - name: test-non-standard-rapid-pypy3.11-noauth-nossl-standalone + - python-pypy3.11 + - sharded_cluster-auth-ssl + - auth + - pypy + - name: test-non-standard-rapid-python3.13-noauth-nossl-standalone commands: - func: run server vars: @@ -4993,14 +4911,13 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - TOOLCHAIN_VERSION: pypy3.11 + TOOLCHAIN_VERSION: "3.13" tags: - test-non-standard - server-rapid - - python-pypy3.11 + - python-3.13 - standalone-noauth-nossl - noauth - - pypy # Test numpy tests - name: test-numpy-python3.10-python3.10 @@ -5027,70 +4944,27 @@ tasks: - pr # Test standard auth tests - - name: test-standard-auth-v4.2-python3.10-auth-ssl-sharded-cluster-min-deps + - name: test-standard-auth-v4.4-python3.10-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster - VERSION: "4.2" + VERSION: "4.4" TEST_MIN_DEPS: "1" TOOLCHAIN_VERSION: "3.10" - tags: - - test-standard-auth - - server-4.2 - - python-3.10 - - sharded_cluster-auth-ssl - - auth - - name: test-standard-auth-v4.2-pypy3.11-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.2" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.2" - TOOLCHAIN_VERSION: pypy3.11 - tags: - - test-standard-auth - - server-4.2 - - python-pypy3.11 - - sharded_cluster-auth-ssl - - auth - - pypy - - name: test-standard-auth-v4.4-python3.11-auth-ssl-sharded-cluster - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.4" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - VERSION: "4.4" - TOOLCHAIN_VERSION: "3.11" tags: - test-standard-auth - server-4.4 - - python-3.11 + - python-3.10 - sharded_cluster-auth-ssl - auth - name: test-standard-auth-v4.4-pypy3.11-auth-ssl-sharded-cluster @@ -5115,7 +4989,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-v5.0-python3.12-auth-ssl-sharded-cluster + - name: test-standard-auth-v5.0-python3.11-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -5129,11 +5003,11 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - TOOLCHAIN_VERSION: "3.12" + TOOLCHAIN_VERSION: "3.11" tags: - test-standard-auth - server-5.0 - - python-3.12 + - python-3.11 - sharded_cluster-auth-ssl - auth - name: test-standard-auth-v5.0-pypy3.11-auth-ssl-sharded-cluster @@ -5158,7 +5032,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-v6.0-python3.13-auth-ssl-sharded-cluster + - name: test-standard-auth-v6.0-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -5172,11 +5046,11 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - TOOLCHAIN_VERSION: "3.13" + TOOLCHAIN_VERSION: "3.12" tags: - test-standard-auth - server-6.0 - - python-3.13 + - python-3.12 - sharded_cluster-auth-ssl - auth - name: test-standard-auth-v6.0-pypy3.11-auth-ssl-sharded-cluster @@ -5201,7 +5075,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-v7.0-python3.14t-auth-ssl-sharded-cluster + - name: test-standard-auth-v7.0-python3.13-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -5215,14 +5089,13 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - TOOLCHAIN_VERSION: 3.14t + TOOLCHAIN_VERSION: "3.13" tags: - test-standard-auth - server-7.0 - - python-3.14t + - python-3.13 - sharded_cluster-auth-ssl - auth - - free-threaded - name: test-standard-auth-v7.0-pypy3.11-auth-ssl-sharded-cluster commands: - func: run server @@ -5245,7 +5118,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-v8.0-python3.14-auth-ssl-sharded-cluster + - name: test-standard-auth-v8.0-python3.14t-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -5259,13 +5132,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - TOOLCHAIN_VERSION: "3.14" + TOOLCHAIN_VERSION: 3.14t tags: - test-standard-auth - server-8.0 - - python-3.14 + - python-3.14t - sharded_cluster-auth-ssl - auth + - free-threaded - name: test-standard-auth-v8.0-pypy3.11-auth-ssl-sharded-cluster commands: - func: run server @@ -5288,7 +5162,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-latest-python3.11-auth-ssl-sharded-cluster-cov + - name: test-standard-auth-latest-python3.10-auth-ssl-sharded-cluster-min-deps commands: - func: run server vars: @@ -5296,19 +5170,19 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - COVERAGE: "1" + TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - COVERAGE: "1" - TOOLCHAIN_VERSION: "3.11" + TEST_MIN_DEPS: "1" + TOOLCHAIN_VERSION: "3.10" tags: - test-standard-auth - server-latest - - python-3.11 + - python-3.10 - sharded_cluster-auth-ssl - auth - pr @@ -5334,7 +5208,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-standard-auth-rapid-python3.10-auth-ssl-sharded-cluster-min-deps + - name: test-standard-auth-rapid-python3.14-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -5342,19 +5216,17 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - TEST_MIN_DEPS: "1" - func: run tests vars: AUTH: auth SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - TEST_MIN_DEPS: "1" - TOOLCHAIN_VERSION: "3.10" + TOOLCHAIN_VERSION: "3.14" tags: - test-standard-auth - server-rapid - - python-3.10 + - python-3.14 - sharded_cluster-auth-ssl - auth - name: test-standard-auth-rapid-pypy3.11-auth-ssl-sharded-cluster diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index b167508539..1442c2557a 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -491,15 +491,6 @@ buildvariants: - rhel87-small # Server version tests - - name: mongodb-v4.2 - tasks: - - name: .server-version - display_name: "* MongoDB v4.2" - run_on: - - rhel87-small - expansions: - VERSION: "4.2" - tags: [coverage_tag] - name: mongodb-v4.4 tasks: - name: .server-version diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index 50fd8526aa..78bd3527cf 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -21,7 +21,7 @@ # Globals ############## -ALL_VERSIONS = ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] +ALL_VERSIONS = ["4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] CPYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14t", "3.14"] PYPYS = ["pypy3.11"] MIN_SUPPORT_VERSIONS = ["3.9", "pypy3.9", "pypy3.10"] diff --git a/.evergreen/scripts/run_tests.py b/.evergreen/scripts/run_tests.py index 49986c67ab..0ca9855540 100644 --- a/.evergreen/scripts/run_tests.py +++ b/.evergreen/scripts/run_tests.py @@ -4,7 +4,6 @@ import logging import os import platform -import shlex import shutil import subprocess import sys @@ -205,11 +204,12 @@ def run() -> None: TEST_ARGS.extend(f"-o log_cli_level={logging.DEBUG}".split()) if os.environ.get("COVERAGE"): - binary = sys.executable.replace(os.sep, "/") - cmd = f"{binary} -m coverage run -m pytest {' '.join(TEST_ARGS)} {' '.join(sys.argv[1:])}" - result = subprocess.run(shlex.split(cmd), check=False) # noqa: S603 - cmd = f"{binary} -m coverage report" - subprocess.run(shlex.split(cmd), check=False) # noqa: S603 + binary = sys.executable + result = subprocess.run( # noqa: S603 + [binary, "-m", "coverage", "run", "-m", "pytest", *TEST_ARGS, *sys.argv[1:]], + check=False, + ) + subprocess.run([binary, "-m", "coverage", "report"], check=False) # noqa: S603 if result.returncode != 0: print(result.stderr) sys.exit(result.returncode) diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index e188dcaa9d..81160025a3 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -259,20 +259,21 @@ def handle_test_env() -> None: krb_conf.touch() write_env("KRB5_CONFIG", krb_conf) LOGGER.info("Writing keytab") - keytab = base64.b64decode(config["KEYTAB_BASE64"]) + keytab = base64.b64decode(config["KEYTAB_BASE64_BUILD"]) keytab_file = ROOT / ".evergreen/drivers.keytab" with keytab_file.open("wb") as fid: fid.write(keytab) - principal = config["PRINCIPAL"] + principal = config["PRINCIPAL_BUILD"] LOGGER.info("Running kinit") os.environ["KRB5_CONFIG"] = str(krb_conf) cmd = f"kinit -k -t {keytab_file} -p {principal}" run_command(cmd) LOGGER.info("Setting GSSAPI variables") - write_env("GSSAPI_HOST", config["SASL_HOST"]) + write_env("GSSAPI_HOST", config["SASL_HOST_BUILD"]) write_env("GSSAPI_PORT", config["SASL_PORT"]) - write_env("GSSAPI_PRINCIPAL", config["PRINCIPAL"]) + write_env("GSSAPI_PRINCIPAL", config["PRINCIPAL_BUILD"]) + write_env("SASL_HOST", config["SASL_HOST_BUILD"]) if test_name == "doctest": UV_ARGS.append("--extra docs") diff --git a/README.md b/README.md index 703e000dc5..125ceb8d46 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ a native Python driver for MongoDB, offering both synchronous and asynchronous A [gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.md/) implementation on top of `pymongo`. -PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0. PyMongo follows [semantic versioning](https://semver.org/spec/v2.0.0.html) for its releases. +PyMongo supports MongoDB 4.4, 5.0, 6.0, 7.0, and 8.0. PyMongo follows [semantic versioning](https://semver.org/spec/v2.0.0.html) for its releases. ## Documentation diff --git a/doc/changelog.rst b/doc/changelog.rst index 585ea045c8..9f80729a5d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -4,6 +4,7 @@ Changelog Changes in Version 4.18.0 ------------------------- +- Dropped support for MongoDB 4.2. PyMongo now requires MongoDB 4.4 or later. - Improved TLS connection performance by reusing TLS sessions across connections to the same server, avoiding a full handshake on each new connection. Session resumption is supported on all Python versions for synchronous clients diff --git a/pymongo/asynchronous/aggregation.py b/pymongo/asynchronous/aggregation.py index f1f77acc73..fc8597b273 100644 --- a/pymongo/asynchronous/aggregation.py +++ b/pymongo/asynchronous/aggregation.py @@ -140,13 +140,9 @@ async def get_cursor( cmd = {"aggregate": self._aggregation_target, "pipeline": self._pipeline} cmd.update(self._options) - # Apply this target's read concern if: - # readConcern has not been specified as a kwarg and either - # - server version is >= 4.2 or - # - server version is >= 3.2 and pipeline doesn't use $out - if ("readConcern" not in cmd) and ( - not self._performs_write or (conn.max_wire_version >= 8) - ): + # Apply this target's read concern if readConcern has not been specified as a kwarg. + # $out/$merge pipelines also support readConcern on all supported server versions (4.4+). + if "readConcern" not in cmd: read_concern = self._target.read_concern else: read_concern = None diff --git a/pymongo/asynchronous/bulk.py b/pymongo/asynchronous/bulk.py index 3075afa2b3..c97395db31 100644 --- a/pymongo/asynchronous/bulk.py +++ b/pymongo/asynchronous/bulk.py @@ -576,10 +576,6 @@ async def execute_no_results( raise ConfigurationError( "Must be connected to MongoDB 4.4+ to use hint on unacknowledged delete commands." ) - if unack and self.uses_hint_update and conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on unacknowledged update commands." - ) if unack and self.uses_sort and conn.max_wire_version < 25: raise ConfigurationError( "Must be connected to MongoDB 8.0+ to use sort on unacknowledged update commands." diff --git a/pymongo/asynchronous/collection.py b/pymongo/asynchronous/collection.py index ddffc46632..70de079725 100644 --- a/pymongo/asynchronous/collection.py +++ b/pymongo/asynchronous/collection.py @@ -1010,10 +1010,6 @@ async def _update( else: update_doc["arrayFilters"] = array_filters if hint is not None: - if not acknowledged and conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on unacknowledged update commands." - ) if not isinstance(hint, str): hint = helpers_shared._index_document(hint) update_doc["hint"] = hint @@ -3295,14 +3291,6 @@ async def _find_and_modify_helper( ) cmd["arrayFilters"] = list(array_filters) if hint is not None: - if conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on find and modify commands." - ) - elif not acknowledged and conn.max_wire_version < 9: - raise ConfigurationError( - "Must be connected to MongoDB 4.4+ to use hint on unacknowledged find and modify commands." - ) cmd["hint"] = hint out = await self._command( conn, diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index 6aeea53f4c..b2a1864ff7 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -1804,14 +1804,6 @@ async def _checkout( ): session._pin(server, conn) err_handler.contribute_socket(conn) - if ( - self._encrypter - and not self._encrypter._bypass_auto_encryption - and conn.max_wire_version < 8 - ): - raise ConfigurationError( - "Auto-encryption requires a minimum MongoDB version of 4.2" - ) yield conn async def _select_server( diff --git a/pymongo/asynchronous/server.py b/pymongo/asynchronous/server.py index 9a6984f486..af77238e20 100644 --- a/pymongo/asynchronous/server.py +++ b/pymongo/asynchronous/server.py @@ -157,18 +157,18 @@ async def run_operation( assert listeners is not None start = datetime.now() - use_cmd = operation.use_command(conn) + conn.validate_session(operation.client, operation.session) # type: ignore[arg-type] more_to_come = bool(operation.conn_mgr and operation.conn_mgr.more_to_come) - cmd, dbn = await self.operation_to_command(operation, conn, use_cmd) + cmd, dbn = await self.operation_to_command(operation, conn, True) if more_to_come: request_id = 0 data = b"" max_doc_size = 0 else: - message = operation.get_message(read_preference, conn, use_cmd) + message = operation.get_message(read_preference, conn) request_id, data, max_doc_size = self._split_message(message) - user_fields = _CURSOR_DOC_FIELDS if use_cmd else None + user_fields = _CURSOR_DOC_FIELDS docs, reply, duration = await run_cursor_command( conn, @@ -211,7 +211,6 @@ async def run_operation( conn=conn, duration=duration, request_id=request_id, - from_command=use_cmd, docs=docs, # type: ignore[arg-type] more_to_come=more_to_come, ) @@ -221,7 +220,6 @@ async def run_operation( address=self._description.address, duration=duration, request_id=request_id, - from_command=use_cmd, docs=docs, # type: ignore[arg-type] ) diff --git a/pymongo/asynchronous/topology.py b/pymongo/asynchronous/topology.py index 6af075cdc2..bc0af2a2b2 100644 --- a/pymongo/asynchronous/topology.py +++ b/pymongo/asynchronous/topology.py @@ -899,10 +899,10 @@ async def _handle_error(self, address: _Address, err_ctx: _ErrorContext) -> None err_code = error.details.get("code", default) # type: ignore[union-attr] if err_code in helpers_shared._NOT_PRIMARY_CODES: is_shutting_down = err_code in helpers_shared._SHUTDOWN_CODES - # Mark server Unknown, clear the pool, and request check. + # Mark server Unknown and request check. Clear the pool only on shutdown. if not self._settings.load_balanced: await self._process_change(ServerDescription(address, error=error)) - if is_shutting_down or (err_ctx.max_wire_version <= 7): + if is_shutting_down: # Clear the pool. await server.reset(service_id) server.request_check() diff --git a/pymongo/common.py b/pymongo/common.py index 08da34c7bf..8350302e28 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -64,8 +64,8 @@ MAX_WRITE_BATCH_SIZE = 100000 # What this version of PyMongo supports. -MIN_SUPPORTED_SERVER_VERSION = "4.2" -MIN_SUPPORTED_WIRE_VERSION = 8 +MIN_SUPPORTED_SERVER_VERSION = "4.4" +MIN_SUPPORTED_WIRE_VERSION = 9 # MongoDB 9.0 MAX_SUPPORTED_WIRE_VERSION = 29 diff --git a/pymongo/message.py b/pymongo/message.py index bcd2810895..aaa56cb0b0 100644 --- a/pymongo/message.py +++ b/pymongo/message.py @@ -53,7 +53,6 @@ except ImportError: _use_c = False from pymongo.errors import ( - ConfigurationError, DocumentTooLarge, InvalidOperation, ProtocolError, @@ -379,54 +378,6 @@ def _op_msg( command[identifier] = docs -_pack_long_long = struct.Struct(" bytes: - """Get an OP_GET_MORE message.""" - return b"".join( - [ - _ZERO_32, - bson._make_c_string(collection_name), - _pack_int(num_to_return), - _pack_long_long(cursor_id), - ] - ) - - -def _get_more_compressed( - collection_name: str, - num_to_return: int, - cursor_id: int, - ctx: Union[SnappyContext, ZlibContext, ZstdContext], -) -> tuple[int, bytes]: - """Internal compressed getMore message helper.""" - return _compress(2005, _get_more_impl(collection_name, num_to_return, cursor_id), ctx) - - -def _get_more_uncompressed( - collection_name: str, num_to_return: int, cursor_id: int -) -> tuple[int, bytes]: - """Internal getMore message helper.""" - return __pack_message(2005, _get_more_impl(collection_name, num_to_return, cursor_id)) - - -if _use_c: - _get_more_uncompressed = _cmessage._get_more_message - - -def _get_more( - collection_name: str, - num_to_return: int, - cursor_id: int, - ctx: Union[SnappyContext, ZlibContext, ZstdContext, None] = None, -) -> tuple[int, bytes]: - """Get a **getMore** message.""" - if ctx: - return _get_more_compressed(collection_name, num_to_return, cursor_id, ctx) - return _get_more_uncompressed(collection_name, num_to_return, cursor_id) - - # OP_MSG ------------------------------------------------------------- @@ -1295,22 +1246,6 @@ def reset(self) -> None: def namespace(self) -> str: return f"{self.db}.{self.coll}" - def use_command(self, conn: _AgnosticConnection) -> bool: - use_find_cmd = False - if not self.exhaust: - use_find_cmd = True - elif conn.max_wire_version >= 8: - # OP_MSG supports exhaust on MongoDB 4.2+ - use_find_cmd = True - elif not self.read_concern.ok_for_legacy: - raise ConfigurationError( - f"read concern level of {self.read_concern.level} is not valid " - f"with a max wire version of {conn.max_wire_version}." - ) - - conn.validate_session(self.client, self.session) # type: ignore[arg-type] - return use_find_cmd - def update_command(self, cmd: dict[str, Any]) -> None: self._as_command = cmd, self.db @@ -1354,7 +1289,7 @@ def as_command( return self._as_command def get_message( - self, read_preference: _ServerMode, conn: _AgnosticConnection, use_cmd: bool = False + self, read_preference: _ServerMode, conn: _AgnosticConnection ) -> tuple[int, bytes, int]: """Get a query message""" # Use the read_preference decided by _socket_from_server. @@ -1428,17 +1363,6 @@ def reset(self) -> None: def namespace(self) -> str: return f"{self.db}.{self.coll}" - def use_command(self, conn: _AgnosticConnection) -> bool: - use_cmd = False - if not self.exhaust: - use_cmd = True - elif conn.max_wire_version >= 8: - # OP_MSG supports exhaust on MongoDB 4.2+ - use_cmd = True - - conn.validate_session(self.client, self.session) # type: ignore[arg-type] - return use_cmd - def update_command(self, cmd: dict[str, Any]) -> None: self._as_command = cmd, self.db @@ -1468,49 +1392,22 @@ def as_command( self._as_command = cmd, self.db return self._as_command - def get_message( - self, dummy0: Any, conn: _AgnosticConnection, use_cmd: bool = False - ) -> Union[tuple[int, bytes, int], tuple[int, bytes]]: + def get_message(self, dummy0: Any, conn: _AgnosticConnection) -> tuple[int, bytes, int]: """Get a getmore message.""" - ns = self.namespace() - ctx = conn.compression_context - - if use_cmd: - spec = self.as_command(conn)[0] - if self.conn_mgr and self.exhaust: - flags = _OpMsg.EXHAUST_ALLOWED - else: - flags = 0 - request_id, msg, size, _ = _op_msg( - flags, spec, self.db, None, self.codec_options, ctx=conn.compression_context - ) - return request_id, msg, size - - return _get_more(ns, self.ntoreturn, self.cursor_id, ctx) + spec = self.as_command(conn)[0] + flags = _OpMsg.EXHAUST_ALLOWED if (self.conn_mgr and self.exhaust) else 0 + request_id, msg, size, _ = _op_msg( + flags, spec, self.db, None, self.codec_options, ctx=conn.compression_context + ) + return request_id, msg, size class _RawBatchQuery(_Query): - def use_command(self, conn: _AgnosticConnection) -> bool: - # Compatibility checks. - super().use_command(conn) - if conn.max_wire_version >= 8: - # MongoDB 4.2+ supports exhaust over OP_MSG - return True - elif not self.exhaust: - return True - return False + pass class _RawBatchGetMore(_GetMore): - def use_command(self, conn: _AgnosticConnection) -> bool: - # Compatibility checks. - super().use_command(conn) - if conn.max_wire_version >= 8: - # MongoDB 4.2+ supports exhaust over OP_MSG - return True - elif not self.exhaust: - return True - return False + pass class _CursorAddress(tuple[Any, ...]): diff --git a/pymongo/response.py b/pymongo/response.py index 69cba81200..b832036708 100644 --- a/pymongo/response.py +++ b/pymongo/response.py @@ -27,7 +27,7 @@ class Response: - __slots__ = ("_address", "_data", "_docs", "_duration", "_from_command", "_request_id") + __slots__ = ("_address", "_data", "_docs", "_duration", "_request_id") def __init__( self, @@ -35,7 +35,6 @@ def __init__( address: _Address, request_id: int, duration: Optional[timedelta], - from_command: bool, docs: Sequence[Mapping[str, Any]], ): """Represent a response from the server. @@ -44,13 +43,11 @@ def __init__( :param address: (host, port) of the source server. :param request_id: The request id of this operation. :param duration: The duration of the operation. - :param from_command: if the response is the result of a db command. """ self._data = data self._address = address self._request_id = request_id self._duration = duration - self._from_command = from_command self._docs = docs @property @@ -73,11 +70,6 @@ def duration(self) -> Optional[timedelta]: """The duration of the operation.""" return self._duration - @property - def from_command(self) -> bool: - """If the response is a result from a db command.""" - return self._from_command - @property def docs(self) -> Sequence[Mapping[str, Any]]: """The decoded document(s).""" @@ -94,7 +86,6 @@ def __init__( conn: _AgnosticConnection, request_id: int, duration: Optional[timedelta], - from_command: bool, docs: list[_DocumentOut], more_to_come: bool, ): @@ -105,12 +96,11 @@ def __init__( :param conn: The AsyncConnection/Connection used for the initial query. :param request_id: The request id of this operation. :param duration: The duration of the operation. - :param from_command: If the response is the result of a db command. :param docs: List of documents. :param more_to_come: Bool indicating whether cursor is ready to be exhausted. """ - super().__init__(data, address, request_id, duration, from_command, docs) + super().__init__(data, address, request_id, duration, docs) self._conn = conn self._more_to_come = more_to_come diff --git a/pymongo/synchronous/aggregation.py b/pymongo/synchronous/aggregation.py index d540484fa8..050a4766b7 100644 --- a/pymongo/synchronous/aggregation.py +++ b/pymongo/synchronous/aggregation.py @@ -140,13 +140,9 @@ def get_cursor( cmd = {"aggregate": self._aggregation_target, "pipeline": self._pipeline} cmd.update(self._options) - # Apply this target's read concern if: - # readConcern has not been specified as a kwarg and either - # - server version is >= 4.2 or - # - server version is >= 3.2 and pipeline doesn't use $out - if ("readConcern" not in cmd) and ( - not self._performs_write or (conn.max_wire_version >= 8) - ): + # Apply this target's read concern if readConcern has not been specified as a kwarg. + # $out/$merge pipelines also support readConcern on all supported server versions (4.4+). + if "readConcern" not in cmd: read_concern = self._target.read_concern else: read_concern = None diff --git a/pymongo/synchronous/bulk.py b/pymongo/synchronous/bulk.py index 36081fe222..41ac25c9a2 100644 --- a/pymongo/synchronous/bulk.py +++ b/pymongo/synchronous/bulk.py @@ -574,10 +574,6 @@ def execute_no_results( raise ConfigurationError( "Must be connected to MongoDB 4.4+ to use hint on unacknowledged delete commands." ) - if unack and self.uses_hint_update and conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on unacknowledged update commands." - ) if unack and self.uses_sort and conn.max_wire_version < 25: raise ConfigurationError( "Must be connected to MongoDB 8.0+ to use sort on unacknowledged update commands." diff --git a/pymongo/synchronous/collection.py b/pymongo/synchronous/collection.py index 15a38b2f3e..7fc211cabb 100644 --- a/pymongo/synchronous/collection.py +++ b/pymongo/synchronous/collection.py @@ -1010,10 +1010,6 @@ def _update( else: update_doc["arrayFilters"] = array_filters if hint is not None: - if not acknowledged and conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on unacknowledged update commands." - ) if not isinstance(hint, str): hint = helpers_shared._index_document(hint) update_doc["hint"] = hint @@ -3289,14 +3285,6 @@ def _find_and_modify_helper( ) cmd["arrayFilters"] = list(array_filters) if hint is not None: - if conn.max_wire_version < 8: - raise ConfigurationError( - "Must be connected to MongoDB 4.2+ to use hint on find and modify commands." - ) - elif not acknowledged and conn.max_wire_version < 9: - raise ConfigurationError( - "Must be connected to MongoDB 4.4+ to use hint on unacknowledged find and modify commands." - ) cmd["hint"] = hint out = self._command( conn, diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index 6b7c5d9c98..a228884ca6 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -1801,14 +1801,6 @@ def _checkout( ): session._pin(server, conn) err_handler.contribute_socket(conn) - if ( - self._encrypter - and not self._encrypter._bypass_auto_encryption - and conn.max_wire_version < 8 - ): - raise ConfigurationError( - "Auto-encryption requires a minimum MongoDB version of 4.2" - ) yield conn def _select_server( diff --git a/pymongo/synchronous/server.py b/pymongo/synchronous/server.py index 7aa017134a..9d85236bc6 100644 --- a/pymongo/synchronous/server.py +++ b/pymongo/synchronous/server.py @@ -157,18 +157,18 @@ def run_operation( assert listeners is not None start = datetime.now() - use_cmd = operation.use_command(conn) + conn.validate_session(operation.client, operation.session) # type: ignore[arg-type] more_to_come = bool(operation.conn_mgr and operation.conn_mgr.more_to_come) - cmd, dbn = self.operation_to_command(operation, conn, use_cmd) + cmd, dbn = self.operation_to_command(operation, conn, True) if more_to_come: request_id = 0 data = b"" max_doc_size = 0 else: - message = operation.get_message(read_preference, conn, use_cmd) + message = operation.get_message(read_preference, conn) request_id, data, max_doc_size = self._split_message(message) - user_fields = _CURSOR_DOC_FIELDS if use_cmd else None + user_fields = _CURSOR_DOC_FIELDS docs, reply, duration = run_cursor_command( conn, @@ -211,7 +211,6 @@ def run_operation( conn=conn, duration=duration, request_id=request_id, - from_command=use_cmd, docs=docs, # type: ignore[arg-type] more_to_come=more_to_come, ) @@ -221,7 +220,6 @@ def run_operation( address=self._description.address, duration=duration, request_id=request_id, - from_command=use_cmd, docs=docs, # type: ignore[arg-type] ) diff --git a/pymongo/synchronous/topology.py b/pymongo/synchronous/topology.py index b419833256..d4be0f945e 100644 --- a/pymongo/synchronous/topology.py +++ b/pymongo/synchronous/topology.py @@ -897,10 +897,10 @@ def _handle_error(self, address: _Address, err_ctx: _ErrorContext) -> None: err_code = error.details.get("code", default) # type: ignore[union-attr] if err_code in helpers_shared._NOT_PRIMARY_CODES: is_shutting_down = err_code in helpers_shared._SHUTDOWN_CODES - # Mark server Unknown, clear the pool, and request check. + # Mark server Unknown and request check. Clear the pool only on shutdown. if not self._settings.load_balanced: self._process_change(ServerDescription(address, error=error)) - if is_shutting_down or (err_ctx.max_wire_version <= 7): + if is_shutting_down: # Clear the pool. server.reset(service_id) server.request_check() diff --git a/test/__init__.py b/test/__init__.py index f4ae7fe948..a6bbd42a3b 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -247,9 +247,6 @@ def _init_client(self): self.cmd_line = self.client.admin.command("getCmdLineOpts") self.server_status = self.client.admin.command("serverStatus") - if self.storage_engine == "mmapv1": - # MMAPv1 does not support retryWrites=True. - self.default_client_options["retryWrites"] = False hello = self.hello self.sessions_enabled = "logicalSessionTimeoutMinutes" in hello diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index 0699451d7e..b19bbc84d3 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -247,9 +247,6 @@ async def _init_client(self): self.cmd_line = await self.client.admin.command("getCmdLineOpts") self.server_status = await self.client.admin.command("serverStatus") - if self.storage_engine == "mmapv1": - # MMAPv1 does not support retryWrites=True. - self.default_client_options["retryWrites"] = False hello = await self.hello self.sessions_enabled = "logicalSessionTimeoutMinutes" in hello diff --git a/test/asynchronous/test_bulk.py b/test/asynchronous/test_bulk.py index b98983df9a..0052218bd4 100644 --- a/test/asynchronous/test_bulk.py +++ b/test/asynchronous/test_bulk.py @@ -165,7 +165,6 @@ async def _test_update_many(self, update): async def test_update_many(self): await self._test_update_many({"$set": {"foo": "bar"}}) - @async_client_context.require_version_min(4, 2, 0) async def test_update_many_pipeline(self): await self._test_update_many([{"$set": {"foo": "bar"}}]) @@ -206,7 +205,6 @@ async def _test_update_one(self, update): async def test_update_one(self): await self._test_update_one({"$set": {"foo": "bar"}}) - @async_client_context.require_version_min(4, 2, 0) async def test_update_one_pipeline(self): await self._test_update_one([{"$set": {"foo": "bar"}}]) diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 508a42502a..809e8c6e9d 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -267,7 +267,6 @@ async def test_batch_size_is_honored(self): # $changeStream.startAtOperationTime was added in 4.0.0. @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_start_at_operation_time(self): optime = await self.get_start_at_operation_time() @@ -436,7 +435,6 @@ async def test_change_operations(self): await self._test_get_invalidate_event(change_stream) @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_start_after(self): resume_token = await self.get_resume_token(invalidate=True) @@ -452,7 +450,6 @@ async def test_start_after(self): self.assertEqual(change["fullDocument"], {"_id": 2}) @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_start_after_resume_process_with_changes(self): resume_token = await self.get_resume_token(invalidate=True) @@ -473,7 +470,6 @@ async def test_start_after_resume_process_with_changes(self): self.assertEqual(change["fullDocument"], {"_id": 3}) @no_type_check - @async_client_context.require_version_min(4, 2) async def test_start_after_resume_process_without_changes(self): resume_token = await self.get_resume_token(invalidate=True) @@ -563,12 +559,10 @@ async def _test_update_resume_token(self, expected_rt_getter): ) # Prose test no. 1 - @async_client_context.require_version_min(4, 2, 0) async def test_update_resume_token(self): await self._test_update_resume_token(self._get_expected_resume_token) # Prose test no. 2 - @async_client_context.require_version_min(4, 2, 0) async def test_raises_error_on_missing_id_418plus(self): # Server returns an error on 4.1.8+ await self._test_raises_error_on_missing_id(OperationFailure) @@ -636,7 +630,6 @@ def raise_error(): # Prose test no. 11 @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_empty_batch(self): client, listener = await self._client_with_listener("getMore") async with await self.change_stream_with_client(client) as change_stream: @@ -648,7 +641,6 @@ async def test_resumetoken_empty_batch(self): # Prose test no. 11 @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_exhausted_batch(self): client, listener = await self._client_with_listener("getMore") async with await self.change_stream_with_client(client) as change_stream: @@ -699,13 +691,11 @@ async def test_resumetoken_uniterated_nonempty_batch_resumeafter(self): # Prose test no. 14 @no_type_check @async_client_context.require_no_mongos - @async_client_context.require_version_min(4, 2, 0) async def test_resumetoken_uniterated_nonempty_batch_startafter(self): await self._test_resumetoken_uniterated_nonempty_batch("start_after") # Prose test no. 17 @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Resume should use startAfter after no changes have been returned. resume_point = await self.get_resume_token() @@ -725,7 +715,6 @@ async def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Prose test no. 18 @no_type_check - @async_client_context.require_version_min(4, 2, 0) async def test_startafter_resume_uses_resumeafter_after_nonempty_getMore(self): # Resume should use resumeAfter after some changes have been returned. resume_point = await self.get_resume_token() @@ -772,7 +761,6 @@ async def test_split_large_change(self): class TestClusterAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin): dbs: list - @async_client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator] @async_client_context.require_change_streams # type:ignore[untyped-decorator] async def asyncSetUp(self) -> None: await super().asyncSetUp() @@ -832,7 +820,6 @@ async def test_full_pipeline(self): class TestAsyncDatabaseAsyncChangeStream(TestAsyncChangeStreamBase, APITestsMixin): - @async_client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator] @async_client_context.require_change_streams # type:ignore[untyped-decorator] async def asyncSetUp(self) -> None: await super().asyncSetUp() diff --git a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py index 7ce93ab360..f3b729316e 100644 --- a/test/asynchronous/test_connections_survive_primary_stepdown_spec.py +++ b/test/asynchronous/test_connections_survive_primary_stepdown_spec.py @@ -74,7 +74,6 @@ def verify_pool_cleared(self): def verify_pool_not_cleared(self): self.assertEqual(self.listener.event_count(monitoring.PoolClearedEvent), 0) - @async_client_context.require_version_min(4, 2, -1) async def test_get_more_iteration(self): # Insert 5 documents with WC majority. await self.coll.insert_many([{"data": k} for k in range(5)]) @@ -118,17 +117,14 @@ async def run_scenario(self, error_code, retry, pool_status_checker): # Always retry here to ensure discovery of new primary. await self.coll.insert_one({"test": 1}) - @async_client_context.require_version_min(4, 2, -1) @async_client_context.require_test_commands async def test_not_primary_keep_connection_pool(self): await self.run_scenario(10107, True, self.verify_pool_not_cleared) - @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_test_commands async def test_shutdown_in_progress(self): await self.run_scenario(91, False, self.verify_pool_cleared) - @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_test_commands async def test_interrupted_at_shutdown(self): await self.run_scenario(11600, False, self.verify_pool_cleared) diff --git a/test/asynchronous/test_custom_types.py b/test/asynchronous/test_custom_types.py index c0564dd876..613a5083db 100644 --- a/test/asynchronous/test_custom_types.py +++ b/test/asynchronous/test_custom_types.py @@ -932,7 +932,6 @@ async def create_targets(self, *args, **kwargs): class TestDatabaseChangeStreamsWCustomTypes( AsyncIntegrationTest, ChangeStreamsWCustomTypesTestMixin ): - @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self): await super().asyncSetUp() @@ -952,7 +951,6 @@ async def create_targets(self, *args, **kwargs): class TestClusterChangeStreamsWCustomTypes( AsyncIntegrationTest, ChangeStreamsWCustomTypesTestMixin ): - @async_client_context.require_version_min(4, 2, 0) @async_client_context.require_change_streams async def asyncSetUp(self): await super().asyncSetUp() diff --git a/test/asynchronous/test_discovery_and_monitoring.py b/test/asynchronous/test_discovery_and_monitoring.py index 6867a12060..38cf269374 100644 --- a/test/asynchronous/test_discovery_and_monitoring.py +++ b/test/asynchronous/test_discovery_and_monitoring.py @@ -269,6 +269,22 @@ def create_tests(): test_name = f"test_{dirname}_{os.path.splitext(filename)[0]}" new_test.__name__ = test_name + + # Skip scenarios where all mock server responses report a wire + # version below the minimum supported (server no longer reachable). + max_version = max( + ( + r[1].get("maxWireVersion", 0) + for phase in scenario_def.get("phases", []) + for r in phase.get("responses", []) + ), + default=common.MIN_SUPPORTED_WIRE_VERSION, + ) + if max_version < common.MIN_SUPPORTED_WIRE_VERSION: + new_test = unittest.skip( + f"Server wire version {max_version} is below minimum {common.MIN_SUPPORTED_WIRE_VERSION}" + )(new_test) + setattr(TestAllScenarios, new_test.__name__, new_test) diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index 57acf5824e..579216720d 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -233,7 +233,6 @@ class AsyncEncryptionIntegrationTest(AsyncIntegrationTest): """Base class for encryption integration tests.""" @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @async_client_context.require_version_min(4, 2, -1) # type:ignore[untyped-decorator] async def asyncSetUp(self) -> None: await super().asyncSetUp() diff --git a/test/asynchronous/test_on_demand_csfle.py b/test/asynchronous/test_on_demand_csfle.py index cd1592318e..b69674b729 100644 --- a/test/asynchronous/test_on_demand_csfle.py +++ b/test/asynchronous/test_on_demand_csfle.py @@ -39,7 +39,6 @@ class TestonDemandGCPCredentials(AsyncIntegrationTest): @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @async_client_context.require_version_min(4, 2, -1) async def asyncSetUp(self): await super().asyncSetUp() self.master_key = { @@ -77,7 +76,6 @@ async def test_02_success(self): class TestonDemandAzureCredentials(AsyncIntegrationTest): @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @async_client_context.require_version_min(4, 2, -1) async def asyncSetUp(self): await super().asyncSetUp() self.master_key = { diff --git a/test/asynchronous/test_transactions.py b/test/asynchronous/test_transactions.py index 7dae183338..2db73b72ee 100644 --- a/test/asynchronous/test_transactions.py +++ b/test/asynchronous/test_transactions.py @@ -316,7 +316,6 @@ async def gridfs_open_upload_stream(*args, **kwargs): await op(*args, session=s) # type: ignore # Require 4.2+ for large (16MB+) transactions. - @async_client_context.require_version_min(4, 2) @async_client_context.require_transactions @unittest.skipIf(sys.platform == "win32", "Our Windows machines are too slow to pass this test") async def test_transaction_starts_with_batched_write(self): diff --git a/test/mockupdb/test_cursor_namespace.py b/test/mockupdb/test_cursor_namespace.py index f77f4a5c2c..adc73ee4e6 100644 --- a/test/mockupdb/test_cursor_namespace.py +++ b/test/mockupdb/test_cursor_namespace.py @@ -42,7 +42,7 @@ class TestCursorNamespace(PyMongoTestCase): @classmethod def setUpClass(cls): - cls.server = MockupDB(auto_ismaster={"maxWireVersion": 8}) + cls.server = MockupDB(auto_ismaster={"maxWireVersion": MIN_SUPPORTED_WIRE_VERSION}) cls.server.run() cls.client = cls.unmanaged_simple_client(cls.server.uri) diff --git a/test/mockupdb/test_op_msg.py b/test/mockupdb/test_op_msg.py index a509d13182..2b97464593 100644 --- a/test/mockupdb/test_op_msg.py +++ b/test/mockupdb/test_op_msg.py @@ -28,6 +28,7 @@ _HAVE_MOCKUPDB = False from pymongo import MongoClient, WriteConcern +from pymongo.common import MIN_SUPPORTED_WIRE_VERSION from pymongo.cursor_shared import CursorType from pymongo.operations import DeleteOne, InsertOne, UpdateOne @@ -281,7 +282,7 @@ class TestOpMsg(PyMongoTestCase): @classmethod def setUpClass(cls): - cls.server = MockupDB(auto_ismaster=True, max_wire_version=8) + cls.server = MockupDB(auto_ismaster=True, max_wire_version=MIN_SUPPORTED_WIRE_VERSION) cls.server.run() cls.client = cls.unmanaged_simple_client(cls.server.uri) diff --git a/test/mockupdb/test_standalone_shard.py b/test/mockupdb/test_standalone_shard.py index c290d63bce..c5f1517484 100644 --- a/test/mockupdb/test_standalone_shard.py +++ b/test/mockupdb/test_standalone_shard.py @@ -29,6 +29,7 @@ from pymongo import MongoClient +from pymongo.common import MIN_SUPPORTED_WIRE_VERSION from pymongo.errors import OperationFailure pytestmark = pytest.mark.mockupdb @@ -37,7 +38,7 @@ class TestStandaloneShard(unittest.TestCase): # See PYTHON-2048 and SERVER-44591. def test_bulk_txn_error_message(self): - server = MockupDB(auto_ismaster={"maxWireVersion": 8}) + server = MockupDB(auto_ismaster={"maxWireVersion": MIN_SUPPORTED_WIRE_VERSION}) server.run() self.addCleanup(server.stop) client = MongoClient(server.uri) diff --git a/test/test_bulk.py b/test/test_bulk.py index baefb1ad30..113c905a9b 100644 --- a/test/test_bulk.py +++ b/test/test_bulk.py @@ -165,7 +165,6 @@ def _test_update_many(self, update): def test_update_many(self): self._test_update_many({"$set": {"foo": "bar"}}) - @client_context.require_version_min(4, 2, 0) def test_update_many_pipeline(self): self._test_update_many([{"$set": {"foo": "bar"}}]) @@ -206,7 +205,6 @@ def _test_update_one(self, update): def test_update_one(self): self._test_update_one({"$set": {"foo": "bar"}}) - @client_context.require_version_min(4, 2, 0) def test_update_one_pipeline(self): self._test_update_one([{"$set": {"foo": "bar"}}]) diff --git a/test/test_change_stream.py b/test/test_change_stream.py index 01f73edd9a..13a709a109 100644 --- a/test/test_change_stream.py +++ b/test/test_change_stream.py @@ -263,7 +263,6 @@ def test_batch_size_is_honored(self): # $changeStream.startAtOperationTime was added in 4.0.0. @no_type_check - @client_context.require_version_min(4, 2, 0) def test_start_at_operation_time(self): optime = self.get_start_at_operation_time() @@ -432,7 +431,6 @@ def test_change_operations(self): self._test_get_invalidate_event(change_stream) @no_type_check - @client_context.require_version_min(4, 2, 0) def test_start_after(self): resume_token = self.get_resume_token(invalidate=True) @@ -448,7 +446,6 @@ def test_start_after(self): self.assertEqual(change["fullDocument"], {"_id": 2}) @no_type_check - @client_context.require_version_min(4, 2, 0) def test_start_after_resume_process_with_changes(self): resume_token = self.get_resume_token(invalidate=True) @@ -467,7 +464,6 @@ def test_start_after_resume_process_with_changes(self): self.assertEqual(change["fullDocument"], {"_id": 3}) @no_type_check - @client_context.require_version_min(4, 2) def test_start_after_resume_process_without_changes(self): resume_token = self.get_resume_token(invalidate=True) @@ -553,12 +549,10 @@ def _test_update_resume_token(self, expected_rt_getter): ) # Prose test no. 1 - @client_context.require_version_min(4, 2, 0) def test_update_resume_token(self): self._test_update_resume_token(self._get_expected_resume_token) # Prose test no. 2 - @client_context.require_version_min(4, 2, 0) def test_raises_error_on_missing_id_418plus(self): # Server returns an error on 4.1.8+ self._test_raises_error_on_missing_id(OperationFailure) @@ -626,7 +620,6 @@ def raise_error(): # Prose test no. 11 @no_type_check - @client_context.require_version_min(4, 2, 0) def test_resumetoken_empty_batch(self): client, listener = self._client_with_listener("getMore") with self.change_stream_with_client(client) as change_stream: @@ -638,7 +631,6 @@ def test_resumetoken_empty_batch(self): # Prose test no. 11 @no_type_check - @client_context.require_version_min(4, 2, 0) def test_resumetoken_exhausted_batch(self): client, listener = self._client_with_listener("getMore") with self.change_stream_with_client(client) as change_stream: @@ -689,13 +681,11 @@ def test_resumetoken_uniterated_nonempty_batch_resumeafter(self): # Prose test no. 14 @no_type_check @client_context.require_no_mongos - @client_context.require_version_min(4, 2, 0) def test_resumetoken_uniterated_nonempty_batch_startafter(self): self._test_resumetoken_uniterated_nonempty_batch("start_after") # Prose test no. 17 @no_type_check - @client_context.require_version_min(4, 2, 0) def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Resume should use startAfter after no changes have been returned. resume_point = self.get_resume_token() @@ -713,7 +703,6 @@ def test_startafter_resume_uses_startafter_after_empty_getMore(self): # Prose test no. 18 @no_type_check - @client_context.require_version_min(4, 2, 0) def test_startafter_resume_uses_resumeafter_after_nonempty_getMore(self): # Resume should use resumeAfter after some changes have been returned. resume_point = self.get_resume_token() @@ -758,7 +747,6 @@ def test_split_large_change(self): class TestClusterChangeStream(TestChangeStreamBase, APITestsMixin): dbs: list - @client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator] @client_context.require_change_streams # type:ignore[untyped-decorator] def setUp(self) -> None: super().setUp() @@ -818,7 +806,6 @@ def test_full_pipeline(self): class TestDatabaseChangeStream(TestChangeStreamBase, APITestsMixin): - @client_context.require_version_min(4, 2, 0) # type:ignore[untyped-decorator] @client_context.require_change_streams # type:ignore[untyped-decorator] def setUp(self) -> None: super().setUp() diff --git a/test/test_connections_survive_primary_stepdown_spec.py b/test/test_connections_survive_primary_stepdown_spec.py index 51d37b7c57..dfcec79322 100644 --- a/test/test_connections_survive_primary_stepdown_spec.py +++ b/test/test_connections_survive_primary_stepdown_spec.py @@ -74,7 +74,6 @@ def verify_pool_cleared(self): def verify_pool_not_cleared(self): self.assertEqual(self.listener.event_count(monitoring.PoolClearedEvent), 0) - @client_context.require_version_min(4, 2, -1) def test_get_more_iteration(self): # Insert 5 documents with WC majority. self.coll.insert_many([{"data": k} for k in range(5)]) @@ -118,17 +117,14 @@ def run_scenario(self, error_code, retry, pool_status_checker): # Always retry here to ensure discovery of new primary. self.coll.insert_one({"test": 1}) - @client_context.require_version_min(4, 2, -1) @client_context.require_test_commands def test_not_primary_keep_connection_pool(self): self.run_scenario(10107, True, self.verify_pool_not_cleared) - @client_context.require_version_min(4, 2, 0) @client_context.require_test_commands def test_shutdown_in_progress(self): self.run_scenario(91, False, self.verify_pool_cleared) - @client_context.require_version_min(4, 2, 0) @client_context.require_test_commands def test_interrupted_at_shutdown(self): self.run_scenario(11600, False, self.verify_pool_cleared) diff --git a/test/test_custom_types.py b/test/test_custom_types.py index b55eb64d9d..b15449c2f5 100644 --- a/test/test_custom_types.py +++ b/test/test_custom_types.py @@ -928,7 +928,6 @@ def create_targets(self, *args, **kwargs): class TestDatabaseChangeStreamsWCustomTypes(IntegrationTest, ChangeStreamsWCustomTypesTestMixin): - @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self): super().setUp() @@ -946,7 +945,6 @@ def create_targets(self, *args, **kwargs): class TestClusterChangeStreamsWCustomTypes(IntegrationTest, ChangeStreamsWCustomTypesTestMixin): - @client_context.require_version_min(4, 2, 0) @client_context.require_change_streams def setUp(self): super().setUp() diff --git a/test/test_discovery_and_monitoring.py b/test/test_discovery_and_monitoring.py index 1f2c21f9c1..eb156447f7 100644 --- a/test/test_discovery_and_monitoring.py +++ b/test/test_discovery_and_monitoring.py @@ -269,6 +269,22 @@ def create_tests(): test_name = f"test_{dirname}_{os.path.splitext(filename)[0]}" new_test.__name__ = test_name + + # Skip scenarios where all mock server responses report a wire + # version below the minimum supported (server no longer reachable). + max_version = max( + ( + r[1].get("maxWireVersion", 0) + for phase in scenario_def.get("phases", []) + for r in phase.get("responses", []) + ), + default=common.MIN_SUPPORTED_WIRE_VERSION, + ) + if max_version < common.MIN_SUPPORTED_WIRE_VERSION: + new_test = unittest.skip( + f"Server wire version {max_version} is below minimum {common.MIN_SUPPORTED_WIRE_VERSION}" + )(new_test) + setattr(TestAllScenarios, new_test.__name__, new_test) diff --git a/test/test_encryption.py b/test/test_encryption.py index 3bb6e767b4..975a091117 100644 --- a/test/test_encryption.py +++ b/test/test_encryption.py @@ -233,7 +233,6 @@ class EncryptionIntegrationTest(IntegrationTest): """Base class for encryption integration tests.""" @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @client_context.require_version_min(4, 2, -1) # type:ignore[untyped-decorator] def setUp(self) -> None: super().setUp() diff --git a/test/test_on_demand_csfle.py b/test/test_on_demand_csfle.py index 24a0f917e2..607752524d 100644 --- a/test/test_on_demand_csfle.py +++ b/test/test_on_demand_csfle.py @@ -39,7 +39,6 @@ class TestonDemandGCPCredentials(IntegrationTest): @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @client_context.require_version_min(4, 2, -1) def setUp(self): super().setUp() self.master_key = { @@ -77,7 +76,6 @@ def test_02_success(self): class TestonDemandAzureCredentials(IntegrationTest): @unittest.skipUnless(_HAVE_PYMONGOCRYPT, "pymongocrypt is not installed") - @client_context.require_version_min(4, 2, -1) def setUp(self): super().setUp() self.master_key = { diff --git a/test/test_topology.py b/test/test_topology.py index 47e670b20d..489c60f6b0 100644 --- a/test/test_topology.py +++ b/test/test_topology.py @@ -581,7 +581,7 @@ def test_wire_version(self): ) self.assertEqual(server.description.min_wire_version, 1) - self.assertEqual(server.description.max_wire_version, 8) + self.assertEqual(server.description.max_wire_version, common.MIN_SUPPORTED_WIRE_VERSION) t.select_servers(any_server_selector, _Op.TEST) # Incompatible. diff --git a/test/test_transactions.py b/test/test_transactions.py index 10386c3873..bd3760c568 100644 --- a/test/test_transactions.py +++ b/test/test_transactions.py @@ -308,7 +308,6 @@ def gridfs_open_upload_stream(*args, **kwargs): op(*args, session=s) # type: ignore # Require 4.2+ for large (16MB+) transactions. - @client_context.require_version_min(4, 2) @client_context.require_transactions @unittest.skipIf(sys.platform == "win32", "Our Windows machines are too slow to pass this test") def test_transaction_starts_with_batched_write(self):