Merge branch 'master' of github.com:mongodb/mongo-python-driver
This commit is contained in:
commit
d952970816
@ -409,6 +409,7 @@ functions:
|
||||
AUTH=${AUTH} \
|
||||
SSL=${SSL} \
|
||||
TEST_DATA_LAKE=${TEST_DATA_LAKE} \
|
||||
TEST_SUITES=${TEST_SUITES} \
|
||||
MONGODB_API_VERSION=${MONGODB_API_VERSION} \
|
||||
SKIP_HATCH=${SKIP_HATCH} \
|
||||
bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-eg
|
||||
@ -2399,6 +2400,470 @@ axes:
|
||||
batchtime: 10080 # 7 days
|
||||
|
||||
buildvariants:
|
||||
# Server Tests for RHEL8.
|
||||
- name: test-rhel8-py3.9-auth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.9 Auth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.9/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.9-noauth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.9 NoAuth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.9/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.9-noauth-nossl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.9 NoAuth NoSSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.9/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.13-auth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.13 Auth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.13/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.13-noauth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.13 NoAuth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.13/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.13-noauth-nossl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.13 NoAuth NoSSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/3.13/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-pypy3.10-auth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 pypy3.10 Auth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-pypy3.10-noauth-ssl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 pypy3.10 NoAuth SSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-pypy3.10-noauth-nossl-cov
|
||||
tasks:
|
||||
- name: .standalone
|
||||
- name: .replica_set
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 pypy3.10 NoAuth NoSSL cov
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
COVERAGE: coverage
|
||||
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
|
||||
tags: [coverage_tag]
|
||||
- name: test-rhel8-py3.10-auth-ssl
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test RHEL8 py3.10 Auth SSL
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
PYTHON_BINARY: /opt/python/3.10/bin/python3
|
||||
- name: test-rhel8-py3.11-noauth-ssl
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test RHEL8 py3.11 NoAuth SSL
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
PYTHON_BINARY: /opt/python/3.11/bin/python3
|
||||
- name: test-rhel8-py3.12-noauth-nossl
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test RHEL8 py3.12 NoAuth NoSSL
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
PYTHON_BINARY: /opt/python/3.12/bin/python3
|
||||
- name: test-rhel8-pypy3.9-auth-ssl
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test RHEL8 pypy3.9 Auth SSL
|
||||
run_on:
|
||||
- rhel87-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
PYTHON_BINARY: /opt/python/pypy3.9/bin/python3
|
||||
|
||||
# Server tests for MacOS.
|
||||
- name: test-macos-py3.9-auth-ssl-sync
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test macOS py3.9 Auth SSL Sync
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-py3.9-auth-ssl-async
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test macOS py3.9 Auth SSL Async
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-py3.13-noauth-ssl-sync
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test macOS py3.13 NoAuth SSL Sync
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-py3.13-noauth-ssl-async
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test macOS py3.13 NoAuth SSL Async
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-py3.9-noauth-nossl-sync
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test macOS py3.9 NoAuth NoSSL Sync
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-py3.9-noauth-nossl-async
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test macOS py3.9 NoAuth NoSSL Async
|
||||
run_on:
|
||||
- macos-14
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
|
||||
# Server tests for macOS Arm64.
|
||||
- name: test-macos-arm64-py3.9-auth-ssl-sync
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test macOS Arm64 py3.9 Auth SSL Sync
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-arm64-py3.9-auth-ssl-async
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test macOS Arm64 py3.9 Auth SSL Async
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-arm64-py3.13-noauth-ssl-sync
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test macOS Arm64 py3.13 NoAuth SSL Sync
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-arm64-py3.13-noauth-ssl-async
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test macOS Arm64 py3.13 NoAuth SSL Async
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-arm64-py3.9-noauth-nossl-sync
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test macOS Arm64 py3.9 NoAuth NoSSL Sync
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-macos-arm64-py3.9-noauth-nossl-async
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test macOS Arm64 py3.9 NoAuth NoSSL Async
|
||||
run_on:
|
||||
- macos-14-arm64
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
|
||||
# Server tests for Windows.
|
||||
- name: test-win64-py3.9-auth-ssl-sync
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test Win64 py3.9 Auth SSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win64-py3.9-auth-ssl-async
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test Win64 py3.9 Auth SSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win64-py3.13-noauth-ssl-sync
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test Win64 py3.13 NoAuth SSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/Python313/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win64-py3.13-noauth-ssl-async
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test Win64 py3.13 NoAuth SSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/Python313/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win64-py3.9-noauth-nossl-sync
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test Win64 py3.9 NoAuth NoSSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win64-py3.9-noauth-nossl-async
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test Win64 py3.9 NoAuth NoSSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win32-py3.9-auth-ssl-sync
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test Win32 py3.9 Auth SSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/32/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
|
||||
# Server tests for Win32.
|
||||
- name: test-win32-py3.9-auth-ssl-async
|
||||
tasks:
|
||||
- name: .standalone
|
||||
display_name: Test Win32 py3.9 Auth SSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: auth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/32/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win32-py3.13-noauth-ssl-sync
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test Win32 py3.13 NoAuth SSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/32/Python313/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win32-py3.13-noauth-ssl-async
|
||||
tasks:
|
||||
- name: .replica_set
|
||||
display_name: Test Win32 py3.13 NoAuth SSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: ssl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/32/Python313/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win32-py3.9-noauth-nossl-sync
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test Win32 py3.9 NoAuth NoSSL Sync
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default
|
||||
PYTHON_BINARY: C:/python/32/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
- name: test-win32-py3.9-noauth-nossl-async
|
||||
tasks:
|
||||
- name: .sharded_cluster
|
||||
display_name: Test Win32 py3.9 NoAuth NoSSL Async
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
AUTH: noauth
|
||||
SSL: nossl
|
||||
TEST_SUITES: default_async
|
||||
PYTHON_BINARY: C:/python/32/Python39/python.exe
|
||||
SKIP_CSOT_TESTS: "true"
|
||||
|
||||
- matrix_name: "tests-fips"
|
||||
matrix_spec:
|
||||
platform:
|
||||
@ -2409,44 +2874,6 @@ buildvariants:
|
||||
tasks:
|
||||
- "test-fips-standalone"
|
||||
|
||||
- matrix_name: "test-macos"
|
||||
matrix_spec:
|
||||
platform:
|
||||
# MacOS introduced SSL support with MongoDB >= 3.2.
|
||||
# Older server versions (2.6, 3.0) are supported without SSL.
|
||||
- macos
|
||||
auth: "*"
|
||||
ssl: "*"
|
||||
exclude_spec:
|
||||
# No point testing with SSL without auth.
|
||||
- platform: macos
|
||||
auth: "noauth"
|
||||
ssl: "ssl"
|
||||
display_name: "${platform} ${auth} ${ssl}"
|
||||
tasks:
|
||||
- ".latest"
|
||||
- ".8.0"
|
||||
- ".7.0"
|
||||
- ".6.0"
|
||||
- ".5.0"
|
||||
- ".4.4"
|
||||
- ".4.2"
|
||||
- ".4.0"
|
||||
|
||||
- matrix_name: "test-macos-arm64"
|
||||
matrix_spec:
|
||||
platform:
|
||||
- macos-arm64
|
||||
auth-ssl: "*"
|
||||
display_name: "${platform} ${auth-ssl}"
|
||||
tasks:
|
||||
- ".latest"
|
||||
- ".8.0"
|
||||
- ".7.0"
|
||||
- ".6.0"
|
||||
- ".5.0"
|
||||
- ".4.4"
|
||||
|
||||
- matrix_name: "test-macos-encryption"
|
||||
matrix_spec:
|
||||
platform:
|
||||
@ -2486,24 +2913,6 @@ buildvariants:
|
||||
tasks:
|
||||
- ".6.0"
|
||||
|
||||
- matrix_name: "tests-python-version-rhel8-test-ssl"
|
||||
matrix_spec:
|
||||
platform: rhel8
|
||||
python-version: "*"
|
||||
auth-ssl: "*"
|
||||
coverage: "*"
|
||||
display_name: "${python-version} ${platform} ${auth-ssl} ${coverage}"
|
||||
tasks: &all-server-versions
|
||||
- ".rapid"
|
||||
- ".latest"
|
||||
- ".8.0"
|
||||
- ".7.0"
|
||||
- ".6.0"
|
||||
- ".5.0"
|
||||
- ".4.4"
|
||||
- ".4.2"
|
||||
- ".4.0"
|
||||
|
||||
- matrix_name: "tests-pyopenssl"
|
||||
matrix_spec:
|
||||
platform: rhel8
|
||||
@ -2580,7 +2989,16 @@ buildvariants:
|
||||
auth-ssl: "*"
|
||||
coverage: "*"
|
||||
display_name: "${c-extensions} ${python-version} ${platform} ${auth} ${ssl} ${coverage}"
|
||||
tasks: *all-server-versions
|
||||
tasks: &all-server-versions
|
||||
- ".rapid"
|
||||
- ".latest"
|
||||
- ".8.0"
|
||||
- ".7.0"
|
||||
- ".6.0"
|
||||
- ".5.0"
|
||||
- ".4.4"
|
||||
- ".4.2"
|
||||
- ".4.0"
|
||||
|
||||
- matrix_name: "tests-python-version-rhel8-compression"
|
||||
matrix_spec:
|
||||
@ -2629,22 +3047,6 @@ buildvariants:
|
||||
display_name: "${green-framework} ${python-version} ${platform} ${auth-ssl}"
|
||||
tasks: *all-server-versions
|
||||
|
||||
- matrix_name: "tests-windows-python-version"
|
||||
matrix_spec:
|
||||
platform: windows
|
||||
python-version-windows: "*"
|
||||
auth-ssl: "*"
|
||||
display_name: "${platform} ${python-version-windows} ${auth-ssl}"
|
||||
tasks: *all-server-versions
|
||||
|
||||
- matrix_name: "tests-windows-python-version-32-bit"
|
||||
matrix_spec:
|
||||
platform: windows
|
||||
python-version-windows-32: "*"
|
||||
auth-ssl: "*"
|
||||
display_name: "${platform} ${python-version-windows-32} ${auth-ssl}"
|
||||
tasks: *all-server-versions
|
||||
|
||||
- matrix_name: "tests-python-version-supports-openssl-102-test-ssl"
|
||||
matrix_spec:
|
||||
platform: rhel7
|
||||
|
||||
@ -34,8 +34,8 @@ else # Set up virtualenv before installing hatch
|
||||
fi
|
||||
export HATCH_CONFIG
|
||||
hatch config restore
|
||||
hatch config set dirs.data ".hatch/data"
|
||||
hatch config set dirs.cache ".hatch/cache"
|
||||
hatch config set dirs.data "$(pwd)/.hatch/data"
|
||||
hatch config set dirs.cache "$(pwd)/.hatch/cache"
|
||||
|
||||
run_hatch() {
|
||||
python -m hatch run "$@"
|
||||
|
||||
@ -30,7 +30,7 @@ set -o xtrace
|
||||
|
||||
AUTH=${AUTH:-noauth}
|
||||
SSL=${SSL:-nossl}
|
||||
TEST_SUITES=""
|
||||
TEST_SUITES=${TEST_SUITES:-}
|
||||
TEST_ARGS="${*:1}"
|
||||
|
||||
export PIP_QUIET=1 # Quiet by default
|
||||
|
||||
@ -26,7 +26,17 @@ ALL_VERSIONS = ["4.0", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"]
|
||||
CPYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
PYPYS = ["pypy3.9", "pypy3.10"]
|
||||
ALL_PYTHONS = CPYTHONS + PYPYS
|
||||
MIN_MAX_PYTHON = [CPYTHONS[0], CPYTHONS[-1]]
|
||||
BATCHTIME_WEEK = 10080
|
||||
AUTH_SSLS = [("auth", "ssl"), ("noauth", "ssl"), ("noauth", "nossl")]
|
||||
TOPOLOGIES = ["standalone", "replica_set", "sharded_cluster"]
|
||||
SYNCS = ["sync", "async"]
|
||||
DISPLAY_LOOKUP = dict(
|
||||
ssl=dict(ssl="SSL", nossl="NoSSL"),
|
||||
auth=dict(auth="Auth", noauth="NoAuth"),
|
||||
test_suites=dict(default="Sync", default_async="Async"),
|
||||
coverage=dict(coverage="cov"),
|
||||
)
|
||||
HOSTS = dict()
|
||||
|
||||
|
||||
@ -35,11 +45,18 @@ class Host:
|
||||
name: str
|
||||
run_on: str
|
||||
display_name: str
|
||||
expansions: dict[str, str]
|
||||
|
||||
|
||||
HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8")
|
||||
HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64")
|
||||
HOSTS["macos"] = Host("macos", "macos-14", "macOS")
|
||||
_macos_expansions = dict( # CSOT tests are unreliable on slow hosts.
|
||||
SKIP_CSOT_TESTS="true"
|
||||
)
|
||||
|
||||
HOSTS["rhel8"] = Host("rhel8", "rhel87-small", "RHEL8", dict())
|
||||
HOSTS["win64"] = Host("win64", "windows-64-vsMulti-small", "Win64", _macos_expansions)
|
||||
HOSTS["win32"] = Host("win32", "windows-64-vsMulti-small", "Win32", _macos_expansions)
|
||||
HOSTS["macos"] = Host("macos", "macos-14", "macOS", _macos_expansions)
|
||||
HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64", _macos_expansions)
|
||||
|
||||
|
||||
##############
|
||||
@ -67,6 +84,7 @@ def create_variant(
|
||||
expansions["PYTHON_BINARY"] = get_python_binary(python, host)
|
||||
if version:
|
||||
expansions["VERSION"] = version
|
||||
expansions.update(HOSTS[host].expansions)
|
||||
expansions = expansions or None
|
||||
return BuildVariant(
|
||||
name=name,
|
||||
@ -80,10 +98,8 @@ def create_variant(
|
||||
|
||||
def get_python_binary(python: str, host: str) -> str:
|
||||
"""Get the appropriate python binary given a python version and host."""
|
||||
if host == "win64":
|
||||
is_32 = python.startswith("32-bit")
|
||||
if is_32:
|
||||
_, python = python.split()
|
||||
if host in ["win64", "win32"]:
|
||||
if host == "win32":
|
||||
base = "C:/python/32"
|
||||
else:
|
||||
base = "C:/python"
|
||||
@ -93,19 +109,29 @@ def get_python_binary(python: str, host: str) -> str:
|
||||
if host == "rhel8":
|
||||
return f"/opt/python/{python}/bin/python3"
|
||||
|
||||
if host == "macos":
|
||||
if host in ["macos", "macos-arm64"]:
|
||||
return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/python3"
|
||||
|
||||
raise ValueError(f"no match found for python {python} on {host}")
|
||||
|
||||
|
||||
def get_display_name(base: str, host: str, version: str, python: str) -> str:
|
||||
def get_display_name(base: str, host: str, **kwargs) -> str:
|
||||
"""Get the display name of a variant."""
|
||||
if version not in ["rapid", "latest"]:
|
||||
version = f"v{version}"
|
||||
if not python.startswith("pypy"):
|
||||
python = f"py{python}"
|
||||
return f"{base} {HOSTS[host].display_name} {version} {python}"
|
||||
display_name = f"{base} {HOSTS[host].display_name}"
|
||||
for key, value in kwargs.items():
|
||||
name = value
|
||||
if key == "version":
|
||||
if value not in ["rapid", "latest"]:
|
||||
name = f"v{value}"
|
||||
elif key == "python":
|
||||
if not value.startswith("pypy"):
|
||||
name = f"py{value}"
|
||||
elif key.lower() in DISPLAY_LOOKUP:
|
||||
name = DISPLAY_LOOKUP[key.lower()][value]
|
||||
else:
|
||||
raise ValueError(f"Missing display handling for {key}")
|
||||
display_name = f"{display_name} {name}"
|
||||
return display_name
|
||||
|
||||
|
||||
def zip_cycle(*iterables, empty_default=None):
|
||||
@ -115,6 +141,15 @@ def zip_cycle(*iterables, empty_default=None):
|
||||
yield tuple(next(i, empty_default) for i in cycles)
|
||||
|
||||
|
||||
def generate_yaml(tasks=None, variants=None):
|
||||
"""Generate the yaml for a given set of tasks and variants."""
|
||||
project = EvgProject(tasks=tasks, buildvariants=variants)
|
||||
out = ShrubService.generate_yaml(project)
|
||||
# Dedent by two spaces to match what we use in config.yml
|
||||
lines = [line[2:] for line in out.splitlines()]
|
||||
print("\n".join(lines)) # noqa: T201
|
||||
|
||||
|
||||
##############
|
||||
# Variants
|
||||
##############
|
||||
@ -159,9 +194,63 @@ def create_ocsp_variants() -> list[BuildVariant]:
|
||||
return variants
|
||||
|
||||
|
||||
def create_server_variants() -> list[BuildVariant]:
|
||||
variants = []
|
||||
|
||||
# Run the full matrix on linux with min and max CPython, and latest pypy.
|
||||
host = "rhel8"
|
||||
for python, (auth, ssl) in product([*MIN_MAX_PYTHON, PYPYS[-1]], AUTH_SSLS):
|
||||
display_name = f"Test {host}"
|
||||
expansions = dict(AUTH=auth, SSL=ssl, COVERAGE="coverage")
|
||||
display_name = get_display_name("Test", host, python=python, **expansions)
|
||||
variant = create_variant(
|
||||
[f".{t}" for t in TOPOLOGIES],
|
||||
display_name,
|
||||
python=python,
|
||||
host=host,
|
||||
tags=["coverage_tag"],
|
||||
expansions=expansions,
|
||||
)
|
||||
variants.append(variant)
|
||||
|
||||
# Test the rest of the pythons on linux.
|
||||
for python, (auth, ssl), topology in zip_cycle(
|
||||
CPYTHONS[1:-1] + PYPYS[:-1], AUTH_SSLS, TOPOLOGIES
|
||||
):
|
||||
display_name = f"Test {host}"
|
||||
expansions = dict(AUTH=auth, SSL=ssl)
|
||||
display_name = get_display_name("Test", host, python=python, **expansions)
|
||||
variant = create_variant(
|
||||
[f".{topology}"],
|
||||
display_name,
|
||||
python=python,
|
||||
host=host,
|
||||
expansions=expansions,
|
||||
)
|
||||
variants.append(variant)
|
||||
|
||||
# Test a subset on each of the other platforms.
|
||||
for host in ("macos", "macos-arm64", "win64", "win32"):
|
||||
for (python, (auth, ssl), topology), sync in product(
|
||||
zip_cycle(MIN_MAX_PYTHON, AUTH_SSLS, TOPOLOGIES), SYNCS
|
||||
):
|
||||
test_suite = "default" if sync == "sync" else "default_async"
|
||||
expansions = dict(AUTH=auth, SSL=ssl, TEST_SUITES=test_suite)
|
||||
display_name = get_display_name("Test", host, python=python, **expansions)
|
||||
variant = create_variant(
|
||||
[f".{topology}"],
|
||||
display_name,
|
||||
python=python,
|
||||
host=host,
|
||||
expansions=expansions,
|
||||
)
|
||||
variants.append(variant)
|
||||
|
||||
return variants
|
||||
|
||||
|
||||
##################
|
||||
# Generate Config
|
||||
##################
|
||||
|
||||
project = EvgProject(tasks=None, buildvariants=create_ocsp_variants())
|
||||
print(ShrubService.generate_yaml(project)) # noqa: T201
|
||||
generate_yaml(variants=create_server_variants())
|
||||
|
||||
@ -14,6 +14,9 @@ PyMongo 4.11 brings a number of changes including:
|
||||
- Dropped support for MongoDB 3.6.
|
||||
- Added support for free-threaded Python with the GIL disabled. For more information see:
|
||||
`Free-threaded CPython <https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-free-threaded-cpython>`_.
|
||||
- :attr:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.address` and
|
||||
:attr:`~pymongo.mongo_client.MongoClient.address` now correctly block when called on unconnected clients
|
||||
until either connection succeeds or a server selection timeout error is raised.
|
||||
|
||||
Issues Resolved
|
||||
...............
|
||||
|
||||
@ -1453,13 +1453,6 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
'Cannot use "address" property when load balancing among'
|
||||
' mongoses, use "nodes" instead.'
|
||||
)
|
||||
if topology_type not in (
|
||||
TOPOLOGY_TYPE.ReplicaSetWithPrimary,
|
||||
TOPOLOGY_TYPE.Single,
|
||||
TOPOLOGY_TYPE.LoadBalanced,
|
||||
TOPOLOGY_TYPE.Sharded,
|
||||
):
|
||||
return None
|
||||
return await self._server_property("address")
|
||||
|
||||
@property
|
||||
|
||||
@ -1447,13 +1447,6 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]):
|
||||
'Cannot use "address" property when load balancing among'
|
||||
' mongoses, use "nodes" instead.'
|
||||
)
|
||||
if topology_type not in (
|
||||
TOPOLOGY_TYPE.ReplicaSetWithPrimary,
|
||||
TOPOLOGY_TYPE.Single,
|
||||
TOPOLOGY_TYPE.LoadBalanced,
|
||||
TOPOLOGY_TYPE.Sharded,
|
||||
):
|
||||
return None
|
||||
return self._server_property("address")
|
||||
|
||||
@property
|
||||
|
||||
@ -838,8 +838,6 @@ class TestClient(AsyncIntegrationTest):
|
||||
c = await self.async_rs_or_single_client(connect=False)
|
||||
self.assertIsInstance(c.topology_description, TopologyDescription)
|
||||
self.assertEqual(c.topology_description, c._topology._description)
|
||||
self.assertIsNone(await c.address) # PYTHON-2981
|
||||
await c.admin.command("ping") # connect
|
||||
if async_client_context.is_rs:
|
||||
# The primary's host and port are from the replica set config.
|
||||
self.assertIsNotNone(await c.address)
|
||||
@ -2019,6 +2017,22 @@ class TestClient(AsyncIntegrationTest):
|
||||
None,
|
||||
)
|
||||
|
||||
async def test_handshake_09_container_with_provider(self):
|
||||
await self._test_handshake(
|
||||
{
|
||||
ENV_VAR_K8S: "1",
|
||||
"AWS_LAMBDA_RUNTIME_API": "1",
|
||||
"AWS_REGION": "us-east-1",
|
||||
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE": "256",
|
||||
},
|
||||
{
|
||||
"container": {"orchestrator": "kubernetes"},
|
||||
"name": "aws.lambda",
|
||||
"region": "us-east-1",
|
||||
"memory_mb": 256,
|
||||
},
|
||||
)
|
||||
|
||||
def test_dict_hints(self):
|
||||
self.db.t.find(hint={"x": 1})
|
||||
|
||||
|
||||
@ -812,8 +812,6 @@ class TestClient(IntegrationTest):
|
||||
c = self.rs_or_single_client(connect=False)
|
||||
self.assertIsInstance(c.topology_description, TopologyDescription)
|
||||
self.assertEqual(c.topology_description, c._topology._description)
|
||||
self.assertIsNone(c.address) # PYTHON-2981
|
||||
c.admin.command("ping") # connect
|
||||
if client_context.is_rs:
|
||||
# The primary's host and port are from the replica set config.
|
||||
self.assertIsNotNone(c.address)
|
||||
@ -1977,6 +1975,22 @@ class TestClient(IntegrationTest):
|
||||
None,
|
||||
)
|
||||
|
||||
def test_handshake_09_container_with_provider(self):
|
||||
self._test_handshake(
|
||||
{
|
||||
ENV_VAR_K8S: "1",
|
||||
"AWS_LAMBDA_RUNTIME_API": "1",
|
||||
"AWS_REGION": "us-east-1",
|
||||
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE": "256",
|
||||
},
|
||||
{
|
||||
"container": {"orchestrator": "kubernetes"},
|
||||
"name": "aws.lambda",
|
||||
"region": "us-east-1",
|
||||
"memory_mb": 256,
|
||||
},
|
||||
)
|
||||
|
||||
def test_dict_hints(self):
|
||||
self.db.t.find(hint={"x": 1})
|
||||
|
||||
|
||||
@ -59,7 +59,8 @@ class TestSecondaryBecomesStandalone(MockClientTest):
|
||||
|
||||
with self.assertRaises(ServerSelectionTimeoutError):
|
||||
c.db.command("ping")
|
||||
self.assertEqual(c.address, None)
|
||||
with self.assertRaises(ServerSelectionTimeoutError):
|
||||
_ = c.address
|
||||
|
||||
# Client can still discover the primary node
|
||||
c.revive_host("a:1")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user