From ce85ca07cd1c3f7dc44031e2b896beaebbed7a35 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 13:28:41 -0500 Subject: [PATCH 1/9] PYTHON-5479 Drop support for Python 3.9 --- .evergreen/generated_configs/tasks.yml | 699 +++++++------------- .evergreen/scripts/generate_config_utils.py | 2 +- .evergreen/utils.sh | 32 +- CONTRIBUTING.md | 2 +- README.md | 2 +- doc/changelog.rst | 3 + pymongo/asynchronous/cursor.py | 1 - pymongo/asynchronous/helpers.py | 16 - pymongo/synchronous/cursor.py | 1 - pymongo/synchronous/helpers.py | 16 - test/asynchronous/test_change_stream.py | 1 - test/asynchronous/test_client.py | 1 - test/asynchronous/test_collation.py | 1 - test/asynchronous/test_collection.py | 1 - test/asynchronous/test_cursor.py | 1 - test/asynchronous/test_custom_types.py | 1 - test/asynchronous/test_database.py | 1 - test/asynchronous/test_encryption.py | 1 - test/asynchronous/test_examples.py | 1 - test/asynchronous/test_load_balancer.py | 2 - test/asynchronous/test_monitoring.py | 1 - test/asynchronous/test_read_preferences.py | 1 - test/asynchronous/test_session.py | 1 - test/asynchronous/test_transactions.py | 1 - test/asynchronous/unified_format.py | 1 - test/test_change_stream.py | 1 - test/test_client.py | 1 - test/test_collation.py | 1 - test/test_collection.py | 1 - test/test_cursor.py | 1 - test/test_custom_types.py | 1 - test/test_database.py | 1 - test/test_encryption.py | 1 - test/test_examples.py | 1 - test/test_load_balancer.py | 2 - test/test_monitoring.py | 1 - test/test_read_preferences.py | 1 - test/test_session.py | 1 - test/test_transactions.py | 1 - test/unified_format.py | 1 - 40 files changed, 278 insertions(+), 528 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index d6aa8966c4..dc65bfb557 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -22,7 +22,7 @@ tasks: SUB_TEST_NAME: regular PYTHON_VERSION: "3.10" tags: [auth-aws, auth-aws-regular] - - name: test-auth-aws-5.0-assume-role-python3.9 + - name: test-auth-aws-5.0-assume-role-python3.11 commands: - func: run server vars: @@ -33,9 +33,9 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: assume-role - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: [auth-aws, auth-aws-assume-role] - - name: test-auth-aws-6.0-ec2-python3.11 + - name: test-auth-aws-6.0-ec2-python3.12 commands: - func: run server vars: @@ -46,9 +46,9 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: ec2 - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.12" tags: [auth-aws, auth-aws-ec2] - - name: test-auth-aws-7.0-env-creds-python3.12 + - name: test-auth-aws-7.0-env-creds-python3.13 commands: - func: run server vars: @@ -59,9 +59,9 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: env-creds - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" tags: [auth-aws, auth-aws-env-creds] - - name: test-auth-aws-8.0-session-creds-python3.13 + - name: test-auth-aws-8.0-session-creds-python3.14 commands: - func: run server vars: @@ -72,9 +72,9 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: session-creds - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" tags: [auth-aws, auth-aws-session-creds] - - name: test-auth-aws-rapid-web-identity-python3.14 + - name: test-auth-aws-rapid-web-identity-python3.10 commands: - func: run server vars: @@ -85,9 +85,9 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: web-identity - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.10" tags: [auth-aws, auth-aws-web-identity] - - name: test-auth-aws-rapid-web-identity-session-name-python3.14 + - name: test-auth-aws-rapid-web-identity-session-name-python3.10 commands: - func: run server vars: @@ -99,9 +99,9 @@ tasks: TEST_NAME: auth_aws SUB_TEST_NAME: web-identity AWS_ROLE_SESSION_NAME: test - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.10" tags: [auth-aws, auth-aws-web-identity] - - name: test-auth-aws-latest-ecs-python3.10 + - name: test-auth-aws-latest-ecs-python3.11 commands: - func: run server vars: @@ -112,7 +112,7 @@ tasks: vars: TEST_NAME: auth_aws SUB_TEST_NAME: ecs - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" tags: [auth-aws, auth-aws-ecs] # Backport pr tests @@ -265,19 +265,7 @@ tasks: SUB_TEST_NAME: standalone PYTHON_VERSION: "3.10" tags: [mod_wsgi, pr] - - name: mod-wsgi-embedded-mode-replica-set-python3.9 - commands: - - func: run server - vars: - TOPOLOGY: replica_set - PYTHON_VERSION: "3.9" - - func: run tests - vars: - TEST_NAME: mod_wsgi - SUB_TEST_NAME: embedded - PYTHON_VERSION: "3.9" - tags: [mod_wsgi, pr] - - name: mod-wsgi-replica-set-python3.11 + - name: mod-wsgi-embedded-mode-replica-set-python3.11 commands: - func: run server vars: @@ -286,10 +274,10 @@ tasks: - func: run tests vars: TEST_NAME: mod_wsgi - SUB_TEST_NAME: standalone + SUB_TEST_NAME: embedded PYTHON_VERSION: "3.11" tags: [mod_wsgi, pr] - - name: mod-wsgi-embedded-mode-replica-set-python3.12 + - name: mod-wsgi-replica-set-python3.12 commands: - func: run server vars: @@ -298,10 +286,10 @@ tasks: - func: run tests vars: TEST_NAME: mod_wsgi - SUB_TEST_NAME: embedded + SUB_TEST_NAME: standalone PYTHON_VERSION: "3.12" tags: [mod_wsgi, pr] - - name: mod-wsgi-replica-set-python3.13 + - name: mod-wsgi-embedded-mode-replica-set-python3.13 commands: - func: run server vars: @@ -310,10 +298,10 @@ tasks: - func: run tests vars: TEST_NAME: mod_wsgi - SUB_TEST_NAME: standalone + SUB_TEST_NAME: embedded PYTHON_VERSION: "3.13" tags: [mod_wsgi, pr] - - name: mod-wsgi-embedded-mode-replica-set-python3.14 + - name: mod-wsgi-replica-set-python3.14 commands: - func: run server vars: @@ -322,7 +310,7 @@ tasks: - func: run tests vars: TEST_NAME: mod_wsgi - SUB_TEST_NAME: embedded + SUB_TEST_NAME: standalone PYTHON_VERSION: "3.14" tags: [mod_wsgi, pr] @@ -2410,28 +2398,26 @@ tasks: tags: [search_index] # Server version tests - - name: test-server-version-python3.13-async-auth-nossl-replica-set-cov + - name: test-server-version-pypy3.10-async-auth-nossl-replica-set commands: - func: run server vars: AUTH: auth SSL: nossl TOPOLOGY: replica_set - COVERAGE: "1" - func: run tests vars: AUTH: auth SSL: nossl TOPOLOGY: replica_set - COVERAGE: "1" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - server-version - - python-3.13 + - python-pypy3.10 - replica_set-auth-nossl - async - - name: test-server-version-python3.12-sync-auth-nossl-replica-set-cov + - name: test-server-version-python3.14-sync-auth-nossl-replica-set-cov commands: - func: run server vars: @@ -2445,14 +2431,14 @@ tasks: SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - server-version - - python-3.12 + - python-3.14 - replica_set-auth-nossl - sync - - name: test-server-version-python3.11-async-auth-ssl-replica-set-cov + - name: test-server-version-python3.13-async-auth-ssl-replica-set-cov commands: - func: run server vars: @@ -2466,14 +2452,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - server-version - - python-3.11 + - python-3.13 - replica_set-auth-ssl - async - - name: test-server-version-python3.9-sync-auth-ssl-replica-set-cov + - name: test-server-version-python3.12-sync-auth-ssl-replica-set-cov commands: - func: run server vars: @@ -2487,14 +2473,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - server-version - - python-3.9 + - python-3.12 - replica_set-auth-ssl - sync - - name: test-server-version-python3.9-async-noauth-nossl-replica-set-cov + - name: test-server-version-python3.13-async-noauth-nossl-replica-set-cov commands: - func: run server vars: @@ -2508,15 +2494,15 @@ tasks: SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - server-version - - python-3.9 + - python-3.13 - replica_set-noauth-nossl - async - pr - - name: test-server-version-python3.10-sync-noauth-nossl-replica-set-cov + - name: test-server-version-python3.12-sync-noauth-nossl-replica-set-cov commands: - func: run server vars: @@ -2530,34 +2516,36 @@ tasks: SSL: nossl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - server-version - - python-3.10 + - python-3.12 - replica_set-noauth-nossl - sync - pr - - name: test-server-version-pypy3.10-async-noauth-ssl-replica-set + - name: test-server-version-python3.11-async-noauth-ssl-replica-set-cov commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: replica_set - PYTHON_VERSION: pypy3.10 + COVERAGE: "1" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - server-version - - python-pypy3.10 + - python-3.11 - replica_set-noauth-ssl - async - - name: test-server-version-python3.14-sync-noauth-ssl-replica-set-cov + - name: test-server-version-python3.10-sync-noauth-ssl-replica-set-cov commands: - func: run server vars: @@ -2571,14 +2559,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set COVERAGE: "1" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.10" TEST_NAME: default_sync tags: - server-version - - python-3.14 + - python-3.10 - replica_set-noauth-ssl - sync - - name: test-server-version-python3.14-async-auth-nossl-sharded-cluster-cov + - name: test-server-version-python3.11-async-auth-nossl-sharded-cluster-cov commands: - func: run server vars: @@ -2592,14 +2580,14 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster COVERAGE: "1" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - server-version - - python-3.14 + - python-3.11 - sharded_cluster-auth-nossl - async - - name: test-server-version-python3.13-sync-auth-nossl-sharded-cluster-cov + - name: test-server-version-python3.10-sync-auth-nossl-sharded-cluster-cov commands: - func: run server vars: @@ -2613,11 +2601,11 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster COVERAGE: "1" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" TEST_NAME: default_sync tags: - server-version - - python-3.13 + - python-3.10 - sharded_cluster-auth-nossl - sync - name: test-server-version-python3.10-async-auth-ssl-sharded-cluster-cov @@ -2726,27 +2714,6 @@ tasks: - python-3.14 - sharded_cluster-auth-ssl - async - - name: test-server-version-python3.9-async-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.9" - TEST_NAME: default_async - tags: - - server-version - - python-3.9 - - sharded_cluster-auth-ssl - - async - name: test-server-version-pypy3.10-async-auth-ssl-sharded-cluster commands: - func: run server @@ -2872,27 +2839,6 @@ tasks: - python-3.14 - sharded_cluster-auth-ssl - sync - - name: test-server-version-python3.9-sync-auth-ssl-sharded-cluster-cov - commands: - - func: run server - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - - func: run tests - vars: - AUTH: auth - SSL: ssl - TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.9" - TEST_NAME: default_sync - tags: - - server-version - - python-3.9 - - sharded_cluster-auth-ssl - - sync - name: test-server-version-pypy3.10-sync-auth-ssl-sharded-cluster commands: - func: run server @@ -2912,28 +2858,26 @@ tasks: - python-pypy3.10 - sharded_cluster-auth-ssl - sync - - name: test-server-version-python3.11-async-noauth-nossl-sharded-cluster-cov + - name: test-server-version-pypy3.10-async-noauth-nossl-sharded-cluster commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: sharded_cluster - COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: sharded_cluster - COVERAGE: "1" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - server-version - - python-3.11 + - python-pypy3.10 - sharded_cluster-noauth-nossl - async - - name: test-server-version-python3.9-sync-noauth-nossl-sharded-cluster-cov + - name: test-server-version-python3.14-sync-noauth-nossl-sharded-cluster-cov commands: - func: run server vars: @@ -2947,14 +2891,14 @@ tasks: SSL: nossl TOPOLOGY: sharded_cluster COVERAGE: "1" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - server-version - - python-3.9 + - python-3.14 - sharded_cluster-noauth-nossl - sync - - name: test-server-version-python3.10-async-noauth-ssl-sharded-cluster-cov + - name: test-server-version-python3.13-async-noauth-ssl-sharded-cluster-cov commands: - func: run server vars: @@ -2968,33 +2912,35 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster COVERAGE: "1" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - server-version - - python-3.10 + - python-3.13 - sharded_cluster-noauth-ssl - async - - name: test-server-version-pypy3.10-sync-noauth-ssl-sharded-cluster + - name: test-server-version-python3.12-sync-noauth-ssl-sharded-cluster-cov commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: sharded_cluster + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: sharded_cluster - PYTHON_VERSION: pypy3.10 + COVERAGE: "1" + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - server-version - - python-pypy3.10 + - python-3.12 - sharded_cluster-noauth-ssl - sync - - name: test-server-version-python3.12-async-auth-nossl-standalone-cov + - name: test-server-version-python3.13-async-auth-nossl-standalone-cov commands: - func: run server vars: @@ -3008,14 +2954,14 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - server-version - - python-3.12 + - python-3.13 - standalone-auth-nossl - async - - name: test-server-version-python3.11-sync-auth-nossl-standalone-cov + - name: test-server-version-python3.12-sync-auth-nossl-standalone-cov commands: - func: run server vars: @@ -3029,14 +2975,14 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - server-version - - python-3.11 + - python-3.12 - standalone-auth-nossl - sync - - name: test-server-version-python3.9-async-auth-ssl-standalone-cov + - name: test-server-version-python3.11-async-auth-ssl-standalone-cov commands: - func: run server vars: @@ -3050,11 +2996,11 @@ tasks: SSL: ssl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - server-version - - python-3.9 + - python-3.11 - standalone-auth-ssl - async - name: test-server-version-python3.10-sync-auth-ssl-standalone-cov @@ -3078,7 +3024,7 @@ tasks: - python-3.10 - standalone-auth-ssl - sync - - name: test-server-version-python3.10-async-noauth-nossl-standalone-cov + - name: test-server-version-python3.11-async-noauth-nossl-standalone-cov commands: - func: run server vars: @@ -3092,56 +3038,56 @@ tasks: SSL: nossl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - server-version - - python-3.10 + - python-3.11 - standalone-noauth-nossl - async - pr - - name: test-server-version-pypy3.10-sync-noauth-nossl-standalone + - name: test-server-version-python3.10-sync-noauth-nossl-standalone-cov commands: - func: run server vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone + COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: nossl TOPOLOGY: standalone - PYTHON_VERSION: pypy3.10 + COVERAGE: "1" + PYTHON_VERSION: "3.10" TEST_NAME: default_sync tags: - server-version - - python-pypy3.10 + - python-3.10 - standalone-noauth-nossl - sync - pr - - name: test-server-version-python3.14-async-noauth-ssl-standalone-cov + - name: test-server-version-pypy3.10-async-noauth-ssl-standalone commands: - func: run server vars: AUTH: noauth SSL: ssl TOPOLOGY: standalone - COVERAGE: "1" - func: run tests vars: AUTH: noauth SSL: ssl TOPOLOGY: standalone - COVERAGE: "1" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - server-version - - python-3.14 + - python-pypy3.10 - standalone-noauth-ssl - async - - name: test-server-version-python3.13-sync-noauth-ssl-standalone-cov + - name: test-server-version-python3.14-sync-noauth-ssl-standalone-cov commands: - func: run server vars: @@ -3155,16 +3101,16 @@ tasks: SSL: ssl TOPOLOGY: standalone COVERAGE: "1" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - server-version - - python-3.13 + - python-3.14 - standalone-noauth-ssl - sync # Standard tests - - name: test-standard-v4.2-python3.14-sync-noauth-ssl-replica-set + - name: test-standard-v4.2-python3.11-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3178,15 +3124,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.2" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - server-4.2 - - python-3.14 + - python-3.11 - replica_set-noauth-ssl - sync - - name: test-standard-v4.2-python3.9-sync-noauth-ssl-replica-set + - name: test-standard-v4.2-pypy3.10-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3200,37 +3146,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.2" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - server-4.2 - - python-3.9 + - python-pypy3.10 - replica_set-noauth-ssl - sync - - name: test-standard-v4.2-python3.11-sync-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" - PYTHON_VERSION: "3.11" - TEST_NAME: default_sync - tags: - - test-standard - - server-4.2 - - python-3.11 - - sharded_cluster-auth-ssl - - sync - - name: test-standard-v4.2-pypy3.10-sync-auth-ssl-sharded-cluster + - pypy + - name: test-standard-v4.2-python3.12-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3244,15 +3169,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.2" - PYTHON_VERSION: pypy3.10 + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - server-4.2 - - python-pypy3.10 + - python-3.12 - sharded_cluster-auth-ssl - sync - - pypy - name: test-standard-v4.2-python3.10-sync-noauth-nossl-standalone commands: - func: run server @@ -3275,7 +3199,7 @@ tasks: - python-3.10 - standalone-noauth-nossl - sync - - name: test-standard-v4.2-python3.13-sync-noauth-nossl-standalone + - name: test-standard-v4.2-python3.14-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -3289,15 +3213,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "4.2" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - test-standard - server-4.2 - - python-3.13 + - python-3.14 - standalone-noauth-nossl - sync - - name: test-standard-v4.4-python3.14-async-noauth-ssl-replica-set + - name: test-standard-v4.4-python3.11-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -3311,15 +3235,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.4" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - server-4.4 - - python-3.14 + - python-3.11 - replica_set-noauth-ssl - async - - name: test-standard-v4.4-python3.9-async-noauth-ssl-replica-set + - name: test-standard-v4.4-pypy3.10-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -3333,37 +3257,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.4" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - server-4.4 - - python-3.9 + - python-pypy3.10 - replica_set-noauth-ssl - async - - name: test-standard-v4.4-python3.11-async-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" - PYTHON_VERSION: "3.11" - TEST_NAME: default_async - tags: - - test-standard - - server-4.4 - - python-3.11 - - sharded_cluster-auth-ssl - - async - - name: test-standard-v4.4-pypy3.10-async-auth-ssl-sharded-cluster + - pypy + - name: test-standard-v4.4-python3.12-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3377,15 +3280,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.4" - PYTHON_VERSION: pypy3.10 + PYTHON_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - server-4.4 - - python-pypy3.10 + - python-3.12 - sharded_cluster-auth-ssl - async - - pypy - name: test-standard-v4.4-python3.10-async-noauth-nossl-standalone commands: - func: run server @@ -3408,7 +3310,7 @@ tasks: - python-3.10 - standalone-noauth-nossl - async - - name: test-standard-v4.4-python3.13-async-noauth-nossl-standalone + - name: test-standard-v4.4-python3.14-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3422,12 +3324,12 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "4.4" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_async tags: - test-standard - server-4.4 - - python-3.13 + - python-3.14 - standalone-noauth-nossl - async - name: test-standard-v5.0-python3.10-sync-noauth-ssl-replica-set @@ -3452,7 +3354,7 @@ tasks: - python-3.10 - replica_set-noauth-ssl - sync - - name: test-standard-v5.0-python3.13-sync-noauth-ssl-replica-set + - name: test-standard-v5.0-python3.14-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3466,15 +3368,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "5.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - test-standard - server-5.0 - - python-3.13 + - python-3.14 - replica_set-noauth-ssl - sync - - name: test-standard-v5.0-python3.14-sync-auth-ssl-sharded-cluster + - name: test-standard-v5.0-python3.11-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3488,15 +3390,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - server-5.0 - - python-3.14 + - python-3.11 - sharded_cluster-auth-ssl - sync - - name: test-standard-v5.0-python3.9-sync-auth-ssl-sharded-cluster + - name: test-standard-v5.0-pypy3.10-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3510,15 +3412,16 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - server-5.0 - - python-3.9 + - python-pypy3.10 - sharded_cluster-auth-ssl - sync - - name: test-standard-v5.0-python3.12-sync-noauth-nossl-standalone + - pypy + - name: test-standard-v5.0-python3.13-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -3532,12 +3435,12 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "5.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_sync tags: - test-standard - server-5.0 - - python-3.12 + - python-3.13 - standalone-noauth-nossl - sync - name: test-standard-v6.0-python3.10-async-noauth-ssl-replica-set @@ -3562,7 +3465,7 @@ tasks: - python-3.10 - replica_set-noauth-ssl - async - - name: test-standard-v6.0-python3.13-async-noauth-ssl-replica-set + - name: test-standard-v6.0-python3.14-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -3576,15 +3479,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "6.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_async tags: - test-standard - server-6.0 - - python-3.13 + - python-3.14 - replica_set-noauth-ssl - async - - name: test-standard-v6.0-python3.14-async-auth-ssl-sharded-cluster + - name: test-standard-v6.0-python3.11-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3598,15 +3501,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - server-6.0 - - python-3.14 + - python-3.11 - sharded_cluster-auth-ssl - async - - name: test-standard-v6.0-python3.9-async-auth-ssl-sharded-cluster + - name: test-standard-v6.0-pypy3.10-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3620,15 +3523,16 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - server-6.0 - - python-3.9 + - python-pypy3.10 - sharded_cluster-auth-ssl - async - - name: test-standard-v6.0-python3.12-async-noauth-nossl-standalone + - pypy + - name: test-standard-v6.0-python3.13-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3642,15 +3546,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "6.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - test-standard - server-6.0 - - python-3.12 + - python-3.13 - standalone-noauth-nossl - async - - name: test-standard-v7.0-python3.12-sync-noauth-ssl-replica-set + - name: test-standard-v7.0-python3.13-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -3664,12 +3568,12 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "7.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-3.12 + - python-3.13 - replica_set-noauth-ssl - sync - name: test-standard-v7.0-python3.10-sync-auth-ssl-sharded-cluster @@ -3694,7 +3598,7 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - sync - - name: test-standard-v7.0-python3.13-sync-auth-ssl-sharded-cluster + - name: test-standard-v7.0-python3.14-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3708,15 +3612,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-3.13 + - python-3.14 - sharded_cluster-auth-ssl - sync - - name: test-standard-v7.0-python3.11-sync-noauth-nossl-standalone + - name: test-standard-v7.0-python3.12-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -3730,38 +3634,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - PYTHON_VERSION: "3.11" - TEST_NAME: default_sync - tags: - - test-standard - - server-7.0 - - python-3.11 - - standalone-noauth-nossl - - sync - - name: test-standard-v7.0-pypy3.10-sync-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "7.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "7.0" - PYTHON_VERSION: pypy3.10 + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - server-7.0 - - python-pypy3.10 + - python-3.12 - standalone-noauth-nossl - sync - - pypy - - name: test-standard-v8.0-python3.12-async-noauth-ssl-replica-set + - name: test-standard-v8.0-python3.13-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -3775,12 +3656,12 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "8.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-3.12 + - python-3.13 - replica_set-noauth-ssl - async - name: test-standard-v8.0-python3.10-async-auth-ssl-sharded-cluster @@ -3805,7 +3686,7 @@ tasks: - python-3.10 - sharded_cluster-auth-ssl - async - - name: test-standard-v8.0-python3.13-async-auth-ssl-sharded-cluster + - name: test-standard-v8.0-python3.14-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3819,15 +3700,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-3.13 + - python-3.14 - sharded_cluster-auth-ssl - async - - name: test-standard-v8.0-python3.11-async-noauth-nossl-standalone + - name: test-standard-v8.0-python3.12-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3841,38 +3722,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - PYTHON_VERSION: "3.11" - TEST_NAME: default_async - tags: - - test-standard - - server-8.0 - - python-3.11 - - standalone-noauth-nossl - - async - - name: test-standard-v8.0-pypy3.10-async-noauth-nossl-standalone - commands: - - func: run server - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" - - func: run tests - vars: - AUTH: noauth - SSL: nossl - TOPOLOGY: standalone - VERSION: "8.0" - PYTHON_VERSION: pypy3.10 + PYTHON_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - server-8.0 - - python-pypy3.10 + - python-3.12 - standalone-noauth-nossl - async - - pypy - - name: test-standard-latest-python3.11-async-noauth-ssl-replica-set + - name: test-standard-latest-python3.12-async-noauth-ssl-replica-set commands: - func: run server vars: @@ -3886,39 +3744,16 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.12" TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.11 + - python-3.12 - replica_set-noauth-ssl - async - pr - - name: test-standard-latest-pypy3.10-async-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 - PYTHON_VERSION: pypy3.10 - TEST_NAME: default_async - tags: - - test-standard - - server-latest - - python-pypy3.10 - - replica_set-noauth-ssl - - async - - pypy - - name: test-standard-latest-python3.12-async-auth-ssl-sharded-cluster + - name: test-standard-latest-python3.13-async-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -3932,16 +3767,16 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.12 + - python-3.13 - sharded_cluster-auth-ssl - async - pr - - name: test-standard-latest-python3.14-async-noauth-nossl-standalone + - name: test-standard-latest-python3.11-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3955,16 +3790,16 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: latest - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.14 + - python-3.11 - standalone-noauth-nossl - async - pr - - name: test-standard-latest-python3.9-async-noauth-nossl-standalone + - name: test-standard-latest-pypy3.10-async-noauth-nossl-standalone commands: - func: run server vars: @@ -3978,38 +3813,16 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: latest - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_async tags: - test-standard - server-latest - - python-3.9 + - python-pypy3.10 - standalone-noauth-nossl - async - - pr - - name: test-standard-rapid-python3.11-sync-noauth-ssl-replica-set - commands: - - func: run server - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid - - func: run tests - vars: - AUTH: noauth - SSL: ssl - TOPOLOGY: replica_set - VERSION: rapid - PYTHON_VERSION: "3.11" - TEST_NAME: default_sync - tags: - - test-standard - - server-rapid - - python-3.11 - - replica_set-noauth-ssl - - sync - - name: test-standard-rapid-pypy3.10-sync-noauth-ssl-replica-set + - pypy + - name: test-standard-rapid-python3.12-sync-noauth-ssl-replica-set commands: - func: run server vars: @@ -4023,16 +3836,15 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - PYTHON_VERSION: pypy3.10 + PYTHON_VERSION: "3.12" TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-pypy3.10 + - python-3.12 - replica_set-noauth-ssl - sync - - pypy - - name: test-standard-rapid-python3.12-sync-auth-ssl-sharded-cluster + - name: test-standard-rapid-python3.13-sync-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4046,15 +3858,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-3.12 + - python-3.13 - sharded_cluster-auth-ssl - sync - - name: test-standard-rapid-python3.14-sync-noauth-nossl-standalone + - name: test-standard-rapid-python3.11-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -4068,15 +3880,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-3.14 + - python-3.11 - standalone-noauth-nossl - sync - - name: test-standard-rapid-python3.9-sync-noauth-nossl-standalone + - name: test-standard-rapid-pypy3.10-sync-noauth-nossl-standalone commands: - func: run server vars: @@ -4090,17 +3902,18 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - PYTHON_VERSION: "3.9" + PYTHON_VERSION: pypy3.10 TEST_NAME: default_sync tags: - test-standard - server-rapid - - python-3.9 + - python-pypy3.10 - standalone-noauth-nossl - sync + - pypy # Test non standard tests - - name: test-non-standard-v4.2-python3.9-noauth-ssl-replica-set + - name: test-non-standard-v4.2-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4114,14 +3927,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.2" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-4.2 - - python-3.9 + - python-3.11 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v4.2-python3.11-auth-ssl-sharded-cluster + - name: test-non-standard-v4.2-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4135,11 +3948,11 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.2" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-4.2 - - python-3.11 + - python-3.12 - sharded_cluster-auth-ssl - auth - name: test-non-standard-v4.2-python3.10-noauth-nossl-standalone @@ -4185,7 +3998,7 @@ tasks: - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-v4.4-python3.13-noauth-ssl-replica-set + - name: test-non-standard-v4.4-python3.14-noauth-ssl-replica-set commands: - func: run server vars: @@ -4199,11 +4012,11 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "4.4" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.14" tags: - test-non-standard - server-4.4 - - python-3.13 + - python-3.14 - replica_set-noauth-ssl - noauth - name: test-non-standard-v4.4-pypy3.10-noauth-ssl-replica-set @@ -4228,7 +4041,7 @@ tasks: - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-v4.4-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-v4.4-python3.10-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4242,14 +4055,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "4.4" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-4.4 - - python-3.14 + - python-3.10 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v4.4-python3.12-noauth-nossl-standalone + - name: test-non-standard-v4.4-python3.13-noauth-nossl-standalone commands: - func: run server vars: @@ -4263,14 +4076,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "4.4" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-4.4 - - python-3.12 + - python-3.13 - standalone-noauth-nossl - noauth - - name: test-non-standard-v5.0-python3.9-noauth-ssl-replica-set + - name: test-non-standard-v5.0-python3.12-noauth-ssl-replica-set commands: - func: run server vars: @@ -4284,14 +4097,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "5.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-5.0 - - python-3.9 + - python-3.12 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v5.0-python3.11-auth-ssl-sharded-cluster + - name: test-non-standard-v5.0-python3.13-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4305,11 +4118,11 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "5.0" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-5.0 - - python-3.11 + - python-3.13 - sharded_cluster-auth-ssl - auth - name: test-non-standard-v5.0-pypy3.10-auth-ssl-sharded-cluster @@ -4334,7 +4147,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-non-standard-v5.0-python3.10-noauth-nossl-standalone + - name: test-non-standard-v5.0-python3.11-noauth-nossl-standalone commands: - func: run server vars: @@ -4348,14 +4161,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "5.0" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-5.0 - - python-3.10 + - python-3.11 - standalone-noauth-nossl - noauth - - name: test-non-standard-v6.0-python3.13-noauth-ssl-replica-set + - name: test-non-standard-v6.0-python3.10-noauth-ssl-replica-set commands: - func: run server vars: @@ -4369,14 +4182,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "6.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-6.0 - - python-3.13 + - python-3.10 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v6.0-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-v6.0-python3.11-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4390,14 +4203,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "6.0" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-6.0 - - python-3.14 + - python-3.11 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v6.0-python3.12-noauth-nossl-standalone + - name: test-non-standard-v6.0-python3.14-noauth-nossl-standalone commands: - func: run server vars: @@ -4411,11 +4224,11 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "6.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.14" tags: - test-non-standard - server-6.0 - - python-3.12 + - python-3.14 - standalone-noauth-nossl - noauth - name: test-non-standard-v6.0-pypy3.10-noauth-nossl-standalone @@ -4440,7 +4253,7 @@ tasks: - standalone-noauth-nossl - noauth - pypy - - name: test-non-standard-v7.0-python3.9-noauth-ssl-replica-set + - name: test-non-standard-v7.0-python3.13-noauth-ssl-replica-set commands: - func: run server vars: @@ -4454,11 +4267,11 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "7.0" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-7.0 - - python-3.9 + - python-3.13 - replica_set-noauth-ssl - noauth - name: test-non-standard-v7.0-pypy3.10-noauth-ssl-replica-set @@ -4483,7 +4296,7 @@ tasks: - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-v7.0-python3.11-auth-ssl-sharded-cluster + - name: test-non-standard-v7.0-python3.14-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4497,14 +4310,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "7.0" - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.14" tags: - test-non-standard - server-7.0 - - python-3.11 + - python-3.14 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-v7.0-python3.10-noauth-nossl-standalone + - name: test-non-standard-v7.0-python3.12-noauth-nossl-standalone commands: - func: run server vars: @@ -4518,14 +4331,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "7.0" - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-7.0 - - python-3.10 + - python-3.12 - standalone-noauth-nossl - noauth - - name: test-non-standard-v8.0-python3.13-noauth-ssl-replica-set + - name: test-non-standard-v8.0-python3.11-noauth-ssl-replica-set commands: - func: run server vars: @@ -4539,14 +4352,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: "8.0" - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-8.0 - - python-3.13 + - python-3.11 - replica_set-noauth-ssl - noauth - - name: test-non-standard-v8.0-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-v8.0-python3.12-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4560,11 +4373,11 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: "8.0" - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-8.0 - - python-3.14 + - python-3.12 - sharded_cluster-auth-ssl - auth - name: test-non-standard-v8.0-pypy3.10-auth-ssl-sharded-cluster @@ -4589,7 +4402,7 @@ tasks: - sharded_cluster-auth-ssl - auth - pypy - - name: test-non-standard-v8.0-python3.12-noauth-nossl-standalone + - name: test-non-standard-v8.0-python3.10-noauth-nossl-standalone commands: - func: run server vars: @@ -4603,14 +4416,14 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: "8.0" - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-8.0 - - python-3.12 + - python-3.10 - standalone-noauth-nossl - noauth - - name: test-non-standard-latest-python3.13-noauth-ssl-replica-set + - name: test-non-standard-latest-python3.12-noauth-ssl-replica-set commands: - func: run server vars: @@ -4624,11 +4437,11 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: latest - PYTHON_VERSION: "3.13" + PYTHON_VERSION: "3.12" tags: - test-non-standard - server-latest - - python-3.13 + - python-3.12 - replica_set-noauth-ssl - noauth - pr @@ -4654,7 +4467,7 @@ tasks: - replica_set-noauth-ssl - noauth - pypy - - name: test-non-standard-latest-python3.14-auth-ssl-sharded-cluster + - name: test-non-standard-latest-python3.13-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4668,15 +4481,15 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: latest - PYTHON_VERSION: "3.14" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-latest - - python-3.14 + - python-3.13 - sharded_cluster-auth-ssl - auth - pr - - name: test-non-standard-latest-python3.12-noauth-nossl-standalone + - name: test-non-standard-latest-python3.11-noauth-nossl-standalone commands: - func: run server vars: @@ -4690,15 +4503,15 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: latest - PYTHON_VERSION: "3.12" + PYTHON_VERSION: "3.11" tags: - test-non-standard - server-latest - - python-3.12 + - python-3.11 - standalone-noauth-nossl - noauth - pr - - name: test-non-standard-rapid-python3.9-noauth-ssl-replica-set + - name: test-non-standard-rapid-python3.14-noauth-ssl-replica-set commands: - func: run server vars: @@ -4712,14 +4525,14 @@ tasks: SSL: ssl TOPOLOGY: replica_set VERSION: rapid - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.14" tags: - test-non-standard - server-rapid - - python-3.9 + - python-3.14 - replica_set-noauth-ssl - noauth - - name: test-non-standard-rapid-python3.11-auth-ssl-sharded-cluster + - name: test-non-standard-rapid-python3.10-auth-ssl-sharded-cluster commands: - func: run server vars: @@ -4733,14 +4546,14 @@ tasks: SSL: ssl TOPOLOGY: sharded_cluster VERSION: rapid - PYTHON_VERSION: "3.11" + PYTHON_VERSION: "3.10" tags: - test-non-standard - server-rapid - - python-3.11 + - python-3.10 - sharded_cluster-auth-ssl - auth - - name: test-non-standard-rapid-python3.10-noauth-nossl-standalone + - name: test-non-standard-rapid-python3.13-noauth-nossl-standalone commands: - func: run server vars: @@ -4754,11 +4567,11 @@ tasks: SSL: nossl TOPOLOGY: standalone VERSION: rapid - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.13" tags: - test-non-standard - server-rapid - - python-3.10 + - python-3.13 - standalone-noauth-nossl - noauth - name: test-non-standard-rapid-pypy3.10-noauth-nossl-standalone diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index aee4ed3bee..a76753ebe9 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -22,7 +22,7 @@ ############## ALL_VERSIONS = ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"] -CPYTHONS = ["3.10", "3.9", "3.11", "3.12", "3.13", "3.14"] +CPYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] PYPYS = ["pypy3.10"] ALL_PYTHONS = CPYTHONS + PYPYS MIN_MAX_PYTHON = [CPYTHONS[0], CPYTHONS[-1]] diff --git a/.evergreen/utils.sh b/.evergreen/utils.sh index 354d18dbf7..f9f36cc6cc 100755 --- a/.evergreen/utils.sh +++ b/.evergreen/utils.sh @@ -6,29 +6,29 @@ find_python3() { PYTHON="" # Find a suitable toolchain version, if available. if [ "$(uname -s)" = "Darwin" ]; then - PYTHON="/Library/Frameworks/Python.Framework/Versions/3.9/bin/python3" + PYTHON="/Library/Frameworks/Python.Framework/Versions/3.10/bin/python3" elif [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin - PYTHON="C:/python/Python39/python.exe" + PYTHON="C:/python/Python310/python.exe" else - # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.9+. - if [ -f "/opt/python/3.9/bin/python3" ]; then + # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.10+. + if [ -f "/opt/python/3.10/bin/python3" ]; then PYTHON="/opt/python/Current/bin/python3" - elif is_python_39 "$(command -v /opt/mongodbtoolchain/v5/bin/python3)"; then + elif is_python_310 "$(command -v /opt/mongodbtoolchain/v5/bin/python3)"; then PYTHON="/opt/mongodbtoolchain/v5/bin/python3" - elif is_python_39 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then + elif is_python_310 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then PYTHON="/opt/mongodbtoolchain/v4/bin/python3" - elif is_python_39 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then + elif is_python_310 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then PYTHON="/opt/mongodbtoolchain/v3/bin/python3" fi fi - # Add a fallback system python3 if it is available and Python 3.9+. + # Add a fallback system python3 if it is available and Python 3.10+. if [ -z "$PYTHON" ]; then - if is_python_39 "$(command -v python3)"; then + if is_python_310 "$(command -v python3)"; then PYTHON="$(command -v python3)" fi fi if [ -z "$PYTHON" ]; then - echo "Cannot test without python3.9+ installed!" + echo "Cannot test without python3.10+ installed!" exit 1 fi echo "$PYTHON" @@ -99,15 +99,15 @@ testinstall () { fi } -# Function that returns success if the provided Python binary is version 3.9 or later +# Function that returns success if the provided Python binary is version 3.10 or later # Usage: -# is_python_39 /path/to/python +# is_python_310 /path/to/python # * param1: Python binary -is_python_39() { +is_python_310() { if [ -z "$1" ]; then return 1 - elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 9))"; then - # runs when sys.version_info[:2] >= (3, 9) + elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 10))"; then + # runs when sys.version_info[:2] >= (3, 10) return 0 else return 1 @@ -131,7 +131,7 @@ get_python_binary() { else PYTHON="/opt/python/$version/bin/python3" fi - if is_python_39 "$(command -v $PYTHON)"; then + if is_python_310 "$(command -v $PYTHON)"; then echo "$PYTHON" else echo "Could not find suitable python binary for '$version'" >&2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0f22044f6..c4f7b55817 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ be of interest or that has already been addressed. ## Supported Interpreters -PyMongo supports CPython 3.9+ and PyPy3.10+. Language features not +PyMongo supports CPython 3.10+ and PyPy3.10+. Language features not supported by all interpreters can not be used. ## Style Guide diff --git a/README.md b/README.md index 695f00be0a..ba1688cb70 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ package that is incompatible with PyMongo. ## Dependencies -PyMongo supports CPython 3.9+ and PyPy3.10+. +PyMongo supports CPython 3.10+ and PyPy3.10+. Required dependencies: diff --git a/doc/changelog.rst b/doc/changelog.rst index a1cea177b9..c3e03f5b2e 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,6 +6,9 @@ Changes in Version 4.16.0 (XXXX/XX/XX) PyMongo 4.16 brings a number of changes including: +.. warning:: PyMongo 4.16 drops support for Python 3.9: Python 3.10+is now required. + +- Dropped support for Python 3.9. - Removed invalid documents from :class:`bson.errors.InvalidDocument` error messages as doing so may leak sensitive user data. Instead, invalid documents are stored in :attr:`bson.errors.InvalidDocument.document`. diff --git a/pymongo/asynchronous/cursor.py b/pymongo/asynchronous/cursor.py index df060a4fa9..cf3a5372b4 100644 --- a/pymongo/asynchronous/cursor.py +++ b/pymongo/asynchronous/cursor.py @@ -37,7 +37,6 @@ from bson.code import Code from bson.son import SON from pymongo import _csot, helpers_shared -from pymongo.asynchronous.helpers import anext from pymongo.collation import validate_collation_or_none from pymongo.common import ( validate_is_document_type, diff --git a/pymongo/asynchronous/helpers.py b/pymongo/asynchronous/helpers.py index ccda16e28b..4a8c918133 100644 --- a/pymongo/asynchronous/helpers.py +++ b/pymongo/asynchronous/helpers.py @@ -16,9 +16,7 @@ from __future__ import annotations import asyncio -import builtins import socket -import sys from typing import ( Any, Callable, @@ -86,17 +84,3 @@ async def _getaddrinfo( return await loop.getaddrinfo(host, port, **kwargs) # type: ignore[return-value] else: return socket.getaddrinfo(host, port, **kwargs) - - -if sys.version_info >= (3, 10): - anext = builtins.anext - aiter = builtins.aiter -else: - - async def anext(cls: Any) -> Any: - """Compatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#anext.""" - return await cls.__anext__() - - def aiter(cls: Any) -> Any: - """Compatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#anext.""" - return cls.__aiter__() diff --git a/pymongo/synchronous/cursor.py b/pymongo/synchronous/cursor.py index 2cecc5b38a..12e2863bc6 100644 --- a/pymongo/synchronous/cursor.py +++ b/pymongo/synchronous/cursor.py @@ -55,7 +55,6 @@ _RawBatchQuery, ) from pymongo.response import PinnedResponse -from pymongo.synchronous.helpers import next from pymongo.typings import _Address, _CollationIn, _DocumentOut, _DocumentType from pymongo.write_concern import validate_boolean diff --git a/pymongo/synchronous/helpers.py b/pymongo/synchronous/helpers.py index 1fff9a0f23..c1b75a3c95 100644 --- a/pymongo/synchronous/helpers.py +++ b/pymongo/synchronous/helpers.py @@ -16,9 +16,7 @@ from __future__ import annotations import asyncio -import builtins import socket -import sys from typing import ( Any, Callable, @@ -86,17 +84,3 @@ def _getaddrinfo( return loop.getaddrinfo(host, port, **kwargs) # type: ignore[return-value] else: return socket.getaddrinfo(host, port, **kwargs) - - -if sys.version_info >= (3, 10): - next = builtins.next - iter = builtins.iter -else: - - def next(cls: Any) -> Any: - """Compatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#next.""" - return cls.__next__() - - def iter(cls: Any) -> Any: - """Compatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#next.""" - return cls.__iter__() diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 1be45bee3e..3fb8b517f3 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -48,7 +48,6 @@ from bson.raw_bson import DEFAULT_RAW_BSON_OPTIONS, RawBSONDocument from pymongo import AsyncMongoClient from pymongo.asynchronous.command_cursor import AsyncCommandCursor -from pymongo.asynchronous.helpers import anext from pymongo.errors import ( InvalidOperation, OperationFailure, diff --git a/test/asynchronous/test_client.py b/test/asynchronous/test_client.py index f375874916..6794605339 100644 --- a/test/asynchronous/test_client.py +++ b/test/asynchronous/test_client.py @@ -92,7 +92,6 @@ from pymongo.asynchronous.command_cursor import AsyncCommandCursor from pymongo.asynchronous.cursor import AsyncCursor, CursorType from pymongo.asynchronous.database import AsyncDatabase -from pymongo.asynchronous.helpers import anext from pymongo.asynchronous.mongo_client import AsyncMongoClient from pymongo.asynchronous.pool import ( AsyncConnection, diff --git a/test/asynchronous/test_collation.py b/test/asynchronous/test_collation.py index 05e548c79e..da810a2a9f 100644 --- a/test/asynchronous/test_collation.py +++ b/test/asynchronous/test_collation.py @@ -21,7 +21,6 @@ from test.utils_shared import EventListener, OvertCommandListener from typing import Any -from pymongo.asynchronous.helpers import anext from pymongo.collation import ( Collation, CollationAlternate, diff --git a/test/asynchronous/test_collection.py b/test/asynchronous/test_collection.py index 379ec9e8c8..498563fe83 100644 --- a/test/asynchronous/test_collection.py +++ b/test/asynchronous/test_collection.py @@ -51,7 +51,6 @@ from pymongo import ASCENDING, DESCENDING, GEO2D, GEOSPHERE, HASHED, TEXT from pymongo.asynchronous.collection import AsyncCollection, ReturnDocument from pymongo.asynchronous.command_cursor import AsyncCommandCursor -from pymongo.asynchronous.helpers import anext from pymongo.asynchronous.mongo_client import AsyncMongoClient from pymongo.bulk_shared import BulkWriteError from pymongo.cursor_shared import CursorType diff --git a/test/asynchronous/test_cursor.py b/test/asynchronous/test_cursor.py index 08da82762c..906f78cc97 100644 --- a/test/asynchronous/test_cursor.py +++ b/test/asynchronous/test_cursor.py @@ -46,7 +46,6 @@ from bson.raw_bson import RawBSONDocument from pymongo import ASCENDING, DESCENDING from pymongo.asynchronous.cursor import AsyncCursor, CursorType -from pymongo.asynchronous.helpers import anext from pymongo.collation import Collation from pymongo.errors import ExecutionTimeout, InvalidOperation, OperationFailure, PyMongoError from pymongo.operations import _IndexList diff --git a/test/asynchronous/test_custom_types.py b/test/asynchronous/test_custom_types.py index 82c54512cc..f8fa51ba76 100644 --- a/test/asynchronous/test_custom_types.py +++ b/test/asynchronous/test_custom_types.py @@ -53,7 +53,6 @@ from bson.int64 import Int64 from bson.raw_bson import RawBSONDocument from pymongo.asynchronous.collection import ReturnDocument -from pymongo.asynchronous.helpers import anext from pymongo.errors import DuplicateKeyError from pymongo.message import _CursorAddress diff --git a/test/asynchronous/test_database.py b/test/asynchronous/test_database.py index 3b77330c0e..b49183a852 100644 --- a/test/asynchronous/test_database.py +++ b/test/asynchronous/test_database.py @@ -42,7 +42,6 @@ from pymongo.asynchronous import auth from pymongo.asynchronous.collection import AsyncCollection from pymongo.asynchronous.database import AsyncDatabase -from pymongo.asynchronous.helpers import anext from pymongo.asynchronous.mongo_client import AsyncMongoClient from pymongo.errors import ( CollectionInvalid, diff --git a/test/asynchronous/test_encryption.py b/test/asynchronous/test_encryption.py index 5d9cf433ba..74c0136ad0 100644 --- a/test/asynchronous/test_encryption.py +++ b/test/asynchronous/test_encryption.py @@ -40,7 +40,6 @@ import pytest from pymongo.asynchronous.collection import AsyncCollection -from pymongo.asynchronous.helpers import anext from pymongo.daemon import _spawn_daemon from pymongo.uri_parser_shared import _parse_kms_tls_options diff --git a/test/asynchronous/test_examples.py b/test/asynchronous/test_examples.py index dd27623654..21770f490c 100644 --- a/test/asynchronous/test_examples.py +++ b/test/asynchronous/test_examples.py @@ -29,7 +29,6 @@ from test.utils_shared import async_wait_until import pymongo -from pymongo.asynchronous.helpers import anext from pymongo.errors import ConnectionFailure, OperationFailure from pymongo.read_concern import ReadConcern from pymongo.read_preferences import ReadPreference diff --git a/test/asynchronous/test_load_balancer.py b/test/asynchronous/test_load_balancer.py index db7ff9183f..17d85841f9 100644 --- a/test/asynchronous/test_load_balancer.py +++ b/test/asynchronous/test_load_balancer.py @@ -36,8 +36,6 @@ create_async_event, ) -from pymongo.asynchronous.helpers import anext - _IS_SYNC = False pytestmark = pytest.mark.load_balancer diff --git a/test/asynchronous/test_monitoring.py b/test/asynchronous/test_monitoring.py index 9b2a3691eb..6a9a5b8da7 100644 --- a/test/asynchronous/test_monitoring.py +++ b/test/asynchronous/test_monitoring.py @@ -40,7 +40,6 @@ from bson.son import SON from pymongo import CursorType, DeleteOne, InsertOne, UpdateOne, monitoring from pymongo.asynchronous.command_cursor import AsyncCommandCursor -from pymongo.asynchronous.helpers import anext from pymongo.errors import AutoReconnect, NotPrimaryError, OperationFailure from pymongo.read_preferences import ReadPreference from pymongo.write_concern import WriteConcern diff --git a/test/asynchronous/test_read_preferences.py b/test/asynchronous/test_read_preferences.py index 72dd809db0..d18887da40 100644 --- a/test/asynchronous/test_read_preferences.py +++ b/test/asynchronous/test_read_preferences.py @@ -42,7 +42,6 @@ from test.version import Version from bson.son import SON -from pymongo.asynchronous.helpers import anext from pymongo.asynchronous.mongo_client import AsyncMongoClient from pymongo.errors import ConfigurationError, OperationFailure from pymongo.message import _maybe_add_read_preference diff --git a/test/asynchronous/test_session.py b/test/asynchronous/test_session.py index 19ce868c56..ff0feebafc 100644 --- a/test/asynchronous/test_session.py +++ b/test/asynchronous/test_session.py @@ -48,7 +48,6 @@ from pymongo import ASCENDING, AsyncMongoClient, _csot, monitoring from pymongo.asynchronous.command_cursor import AsyncCommandCursor from pymongo.asynchronous.cursor import AsyncCursor -from pymongo.asynchronous.helpers import anext from pymongo.common import _MAX_END_SESSIONS from pymongo.errors import ConfigurationError, InvalidOperation, OperationFailure from pymongo.operations import IndexModel, InsertOne, UpdateOne diff --git a/test/asynchronous/test_transactions.py b/test/asynchronous/test_transactions.py index 5c2a4f6fae..478710362e 100644 --- a/test/asynchronous/test_transactions.py +++ b/test/asynchronous/test_transactions.py @@ -39,7 +39,6 @@ from pymongo.asynchronous.client_session import TransactionOptions from pymongo.asynchronous.command_cursor import AsyncCommandCursor from pymongo.asynchronous.cursor import AsyncCursor -from pymongo.asynchronous.helpers import anext from pymongo.errors import ( AutoReconnect, CollectionInvalid, diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index 64659a34d4..0c9e8c10c8 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -77,7 +77,6 @@ from pymongo.asynchronous.command_cursor import AsyncCommandCursor from pymongo.asynchronous.database import AsyncDatabase from pymongo.asynchronous.encryption import AsyncClientEncryption -from pymongo.asynchronous.helpers import anext from pymongo.driver_info import DriverInfo from pymongo.encryption_options import _HAVE_PYMONGOCRYPT, AutoEncryptionOpts from pymongo.errors import ( diff --git a/test/test_change_stream.py b/test/test_change_stream.py index 59cad8925b..ad51f91873 100644 --- a/test/test_change_stream.py +++ b/test/test_change_stream.py @@ -55,7 +55,6 @@ from pymongo.message import _CursorAddress from pymongo.read_concern import ReadConcern from pymongo.synchronous.command_cursor import CommandCursor -from pymongo.synchronous.helpers import next from pymongo.write_concern import WriteConcern _IS_SYNC = True diff --git a/test/test_client.py b/test/test_client.py index 73ed3ac3d4..9d201c663b 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -114,7 +114,6 @@ from pymongo.synchronous.command_cursor import CommandCursor from pymongo.synchronous.cursor import Cursor, CursorType from pymongo.synchronous.database import Database -from pymongo.synchronous.helpers import next from pymongo.synchronous.mongo_client import MongoClient from pymongo.synchronous.pool import ( Connection, diff --git a/test/test_collation.py b/test/test_collation.py index 5425551dc6..903f24a228 100644 --- a/test/test_collation.py +++ b/test/test_collation.py @@ -37,7 +37,6 @@ UpdateMany, UpdateOne, ) -from pymongo.synchronous.helpers import next from pymongo.write_concern import WriteConcern _IS_SYNC = True diff --git a/test/test_collection.py b/test/test_collection.py index 1bd3a80c5f..18be309f22 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -74,7 +74,6 @@ ) from pymongo.synchronous.collection import Collection, ReturnDocument from pymongo.synchronous.command_cursor import CommandCursor -from pymongo.synchronous.helpers import next from pymongo.synchronous.mongo_client import MongoClient from pymongo.write_concern import WriteConcern diff --git a/test/test_cursor.py b/test/test_cursor.py index b63638bfab..219ca396c9 100644 --- a/test/test_cursor.py +++ b/test/test_cursor.py @@ -51,7 +51,6 @@ from pymongo.read_concern import ReadConcern from pymongo.read_preferences import ReadPreference from pymongo.synchronous.cursor import Cursor, CursorType -from pymongo.synchronous.helpers import next from pymongo.write_concern import WriteConcern _IS_SYNC = True diff --git a/test/test_custom_types.py b/test/test_custom_types.py index aba6b55119..02f3127165 100644 --- a/test/test_custom_types.py +++ b/test/test_custom_types.py @@ -55,7 +55,6 @@ from pymongo.errors import DuplicateKeyError from pymongo.message import _CursorAddress from pymongo.synchronous.collection import ReturnDocument -from pymongo.synchronous.helpers import next _IS_SYNC = True diff --git a/test/test_database.py b/test/test_database.py index c50e09b6e1..ebbf6e55c6 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -51,7 +51,6 @@ from pymongo.synchronous import auth from pymongo.synchronous.collection import Collection from pymongo.synchronous.database import Database -from pymongo.synchronous.helpers import next from pymongo.synchronous.mongo_client import MongoClient from pymongo.write_concern import WriteConcern diff --git a/test/test_encryption.py b/test/test_encryption.py index 50d617dc43..04e61b7bad 100644 --- a/test/test_encryption.py +++ b/test/test_encryption.py @@ -41,7 +41,6 @@ from pymongo.daemon import _spawn_daemon from pymongo.synchronous.collection import Collection -from pymongo.synchronous.helpers import next from pymongo.uri_parser_shared import _parse_kms_tls_options try: diff --git a/test/test_examples.py b/test/test_examples.py index 13f0c94c56..266e32e8d4 100644 --- a/test/test_examples.py +++ b/test/test_examples.py @@ -33,7 +33,6 @@ from pymongo.read_concern import ReadConcern from pymongo.read_preferences import ReadPreference from pymongo.server_api import ServerApi -from pymongo.synchronous.helpers import next from pymongo.write_concern import WriteConcern _IS_SYNC = True diff --git a/test/test_load_balancer.py b/test/test_load_balancer.py index 364a323627..472ef51da3 100644 --- a/test/test_load_balancer.py +++ b/test/test_load_balancer.py @@ -36,8 +36,6 @@ wait_until, ) -from pymongo.synchronous.helpers import next - _IS_SYNC = True pytestmark = pytest.mark.load_balancer diff --git a/test/test_monitoring.py b/test/test_monitoring.py index 7cb93adf81..f5a18af9ed 100644 --- a/test/test_monitoring.py +++ b/test/test_monitoring.py @@ -42,7 +42,6 @@ from pymongo.errors import AutoReconnect, NotPrimaryError, OperationFailure from pymongo.read_preferences import ReadPreference from pymongo.synchronous.command_cursor import CommandCursor -from pymongo.synchronous.helpers import next from pymongo.write_concern import WriteConcern _IS_SYNC = True diff --git a/test/test_read_preferences.py b/test/test_read_preferences.py index afde01723d..084abdf3e1 100644 --- a/test/test_read_preferences.py +++ b/test/test_read_preferences.py @@ -56,7 +56,6 @@ from pymongo.server_description import ServerDescription from pymongo.server_selectors import Selection, readable_server_selector from pymongo.server_type import SERVER_TYPE -from pymongo.synchronous.helpers import next from pymongo.synchronous.mongo_client import MongoClient from pymongo.write_concern import WriteConcern diff --git a/test/test_session.py b/test/test_session.py index 40d0a53afb..9aa56a711e 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -52,7 +52,6 @@ from pymongo.read_concern import ReadConcern from pymongo.synchronous.command_cursor import CommandCursor from pymongo.synchronous.cursor import Cursor -from pymongo.synchronous.helpers import next _IS_SYNC = True diff --git a/test/test_transactions.py b/test/test_transactions.py index f4578deddb..813d6a688d 100644 --- a/test/test_transactions.py +++ b/test/test_transactions.py @@ -50,7 +50,6 @@ from pymongo.synchronous.client_session import TransactionOptions from pymongo.synchronous.command_cursor import CommandCursor from pymongo.synchronous.cursor import Cursor -from pymongo.synchronous.helpers import next _IS_SYNC = True diff --git a/test/unified_format.py b/test/unified_format.py index 580aed552b..0c5f68edd3 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -101,7 +101,6 @@ from pymongo.synchronous.command_cursor import CommandCursor from pymongo.synchronous.database import Database from pymongo.synchronous.encryption import ClientEncryption -from pymongo.synchronous.helpers import next from pymongo.topology_description import TopologyDescription from pymongo.typings import _Address from pymongo.write_concern import WriteConcern From 6039619b8275e82c9b1a6d4fe2b6c402a99f4b7a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 13:32:48 -0500 Subject: [PATCH 2/9] Update actions --- .github/workflows/dist.yml | 13 +++---------- .github/workflows/test-python.yml | 18 +++++++++--------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 0110d8df41..43e0a6808b 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -80,24 +80,17 @@ jobs: CIBW_BUILD: ${{ matrix.buildplat[2] }} run: python -m cibuildwheel --output-dir wheelhouse - - name: Build manylinux1 wheels - if: ${{ matrix.buildplat[1] == 'manylinux_x86_64' || matrix.buildplat[1] == 'manylinux_i686' }} - env: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 - CIBW_MANYLINUX_I686_IMAGE: manylinux1 - CIBW_BUILD: "cp39-${{ matrix.buildplat[1] }} cp39-${{ matrix.buildplat[1] }}" - run: python -m cibuildwheel --output-dir wheelhouse - - name: Assert all versions in wheelhouse if: ${{ ! startsWith(matrix.buildplat[1], 'macos') }} run: | - ls wheelhouse/*cp39*.whl ls wheelhouse/*cp310*.whl ls wheelhouse/*cp311*.whl ls wheelhouse/*cp312*.whl ls wheelhouse/*cp313*.whl + ls wheelhouse/*cp314*.whl # Free-threading builds: ls wheelhouse/*cp313t*.whl + ls wheelhouse/*cp314t*.whl - uses: actions/upload-artifact@v4 with: @@ -118,7 +111,7 @@ jobs: - uses: actions/setup-python@v6 with: # Build sdist on lowest supported Python - python-version: '3.9' + python-version: "3.10" - name: Build SDist run: | diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 336ada8d70..40a497480c 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -26,7 +26,7 @@ jobs: uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5 with: enable-cache: true - python-version: "3.9" + python-version: "3.10" - name: Install just run: uv tool install rust-just - name: Install Python dependencies @@ -56,7 +56,7 @@ jobs: matrix: # Tests currently only pass on ubuntu on GitHub Actions. os: [ubuntu-latest] - python-version: ["3.9", "pypy-3.10", "3.13t"] + python-version: ["3.10", "pypy-3.10", "3.13t"] mongodb-version: ["8.0"] name: CPython ${{ matrix.python-version }}-${{ matrix.os }} @@ -87,7 +87,7 @@ jobs: uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5 with: enable-cache: true - python-version: "3.9" + python-version: "3.10" - name: Install just run: uv tool install rust-just - id: setup-mongodb @@ -112,7 +112,7 @@ jobs: uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5 with: enable-cache: true - python-version: "3.9" + python-version: "3.10" - name: Install just run: uv tool install rust-just - name: Install dependencies @@ -131,7 +131,7 @@ jobs: uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5 with: enable-cache: true - python-version: "3.9" + python-version: "3.10" - name: Install just run: uv tool install rust-just - name: Install dependencies @@ -144,7 +144,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.9", "3.11"] + python: ["3.10", "3.11"] steps: - uses: actions/checkout@v5 with: @@ -175,7 +175,7 @@ jobs: cache: 'pip' cache-dependency-path: 'pyproject.toml' # Build sdist on lowest supported Python - python-version: '3.9' + python-version: "3.10" - name: Build SDist shell: bash run: | @@ -209,7 +209,7 @@ jobs: cache: 'pip' cache-dependency-path: 'sdist/test/pyproject.toml' # Test sdist on lowest supported Python - python-version: '3.9' + python-version: "3.10" - id: setup-mongodb uses: mongodb-labs/drivers-evergreen-tools@master - name: Run connect test from sdist @@ -233,7 +233,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5 with: - python-version: '3.9' + python-version: "3.10" - id: setup-mongodb uses: mongodb-labs/drivers-evergreen-tools@master with: From 051619390b601ff24299c7e2340e98f567b30bcb Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 13:35:29 -0500 Subject: [PATCH 3/9] fix gridfs import --- gridfs/asynchronous/grid_file.py | 1 - gridfs/synchronous/grid_file.py | 1 - 2 files changed, 2 deletions(-) diff --git a/gridfs/asynchronous/grid_file.py b/gridfs/asynchronous/grid_file.py index e512f796a8..69a2200d3b 100644 --- a/gridfs/asynchronous/grid_file.py +++ b/gridfs/asynchronous/grid_file.py @@ -46,7 +46,6 @@ from pymongo.asynchronous.collection import AsyncCollection from pymongo.asynchronous.cursor import AsyncCursor from pymongo.asynchronous.database import AsyncDatabase -from pymongo.asynchronous.helpers import anext from pymongo.common import validate_string from pymongo.errors import ( BulkWriteError, diff --git a/gridfs/synchronous/grid_file.py b/gridfs/synchronous/grid_file.py index 70a4f80774..7364aedda3 100644 --- a/gridfs/synchronous/grid_file.py +++ b/gridfs/synchronous/grid_file.py @@ -57,7 +57,6 @@ from pymongo.synchronous.collection import Collection from pymongo.synchronous.cursor import Cursor from pymongo.synchronous.database import Database -from pymongo.synchronous.helpers import next _IS_SYNC = True From 499e59b783f3cf77078ac80f6ee9139135e88aac Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 13:37:37 -0500 Subject: [PATCH 4/9] fix gridfs import --- test/asynchronous/test_grid_file.py | 1 - test/test_grid_file.py | 1 - 2 files changed, 2 deletions(-) diff --git a/test/asynchronous/test_grid_file.py b/test/asynchronous/test_grid_file.py index f3ca596142..2a7e9e1f9d 100644 --- a/test/asynchronous/test_grid_file.py +++ b/test/asynchronous/test_grid_file.py @@ -47,7 +47,6 @@ ) from gridfs.errors import NoFile from pymongo import AsyncMongoClient -from pymongo.asynchronous.helpers import aiter, anext from pymongo.errors import ConfigurationError, ServerSelectionTimeoutError from pymongo.message import _CursorAddress diff --git a/test/test_grid_file.py b/test/test_grid_file.py index 6fe209f438..c7ccda44a4 100644 --- a/test/test_grid_file.py +++ b/test/test_grid_file.py @@ -49,7 +49,6 @@ from pymongo import MongoClient from pymongo.errors import ConfigurationError, ServerSelectionTimeoutError from pymongo.message import _CursorAddress -from pymongo.synchronous.helpers import iter, next _IS_SYNC = True From f1e434babcfc04fc8994b01a6c1d349096fbf36b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 16:43:55 -0500 Subject: [PATCH 5/9] Update doc/changelog.rst Co-authored-by: Noah Stapp --- doc/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index c3e03f5b2e..b96b3082f8 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,7 +6,7 @@ Changes in Version 4.16.0 (XXXX/XX/XX) PyMongo 4.16 brings a number of changes including: -.. warning:: PyMongo 4.16 drops support for Python 3.9: Python 3.10+is now required. +.. warning:: PyMongo 4.16 drops support for Python 3.9: Python 3.10+ is now required. - Dropped support for Python 3.9. - Removed invalid documents from :class:`bson.errors.InvalidDocument` error messages as From 5d7a42d3128473019eb44726aa333f99b891ceba Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 16:45:27 -0500 Subject: [PATCH 6/9] add trove classifier --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 227865bc30..02c3c0c89f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Database", "Typing :: Typed", ] From 77614bfe1cd15059fdad183b4e022923b7188d5f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 17:02:50 -0500 Subject: [PATCH 7/9] bump cibuildwheel version --- .github/workflows/dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 43e0a6808b..1bbc062eb9 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -70,10 +70,10 @@ jobs: platforms: all - name: Install cibuildwheel - # Note: the default manylinux is manylinux2014 + # Note: the default manylinux is manylinux_2_28 run: | python -m pip install -U pip - python -m pip install "cibuildwheel>=2.20,<3" + python -m pip install "cibuildwheel>=3.20,<4" - name: Build wheels env: From f892ebbfd9b570a27bea5c96b9604c0a6aa4561e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 17:04:31 -0500 Subject: [PATCH 8/9] fix the version --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 1bbc062eb9..18e9ce28e6 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -73,7 +73,7 @@ jobs: # Note: the default manylinux is manylinux_2_28 run: | python -m pip install -U pip - python -m pip install "cibuildwheel>=3.20,<4" + python -m pip install "cibuildwheel>=3.2.0,<4" - name: Build wheels env: From 2266b036270233c5ef713e10bcd98d1e89797460 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 25 Sep 2025 17:05:46 -0500 Subject: [PATCH 9/9] fix config --- .github/workflows/dist.yml | 1 - pyproject.toml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 18e9ce28e6..acbfc6cfe5 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -89,7 +89,6 @@ jobs: ls wheelhouse/*cp313*.whl ls wheelhouse/*cp314*.whl # Free-threading builds: - ls wheelhouse/*cp313t*.whl ls wheelhouse/*cp314t*.whl - uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index 02c3c0c89f..0cf161baab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -261,8 +261,6 @@ partial_branches = ["if (.*and +)*not _use_c( and.*)*:"] directory = "htmlcov" [tool.cibuildwheel] -# Enable free-threaded support -free-threaded-support = true skip = "pp* *-musllinux*" build-frontend = "build" test-command = "python {project}/tools/fail_if_no_c.py"