Skip to content

Commit 7a3bd7e

Browse files
authored
PYTHON-2793 Stop testing TLS with Python 3.10 and MongoDB <= 3.4 (#748)
1 parent 0ea2979 commit 7a3bd7e

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.evergreen/config.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,31 @@ buildvariants:
25332533
auth-ssl: "*"
25342534
display_name: "${platform} ${python-version-windows} ${auth-ssl}"
25352535
tasks: *all-server-versions
2536+
rules:
2537+
# Python 3.10+ and MongoDB <= 3.4 don't have any TLS ciphers in common.
2538+
- if:
2539+
platform: "*"
2540+
python-version-windows: "3.10"
2541+
auth-ssl: "auth-ssl"
2542+
then:
2543+
remove_tasks:
2544+
- ".2.6"
2545+
- ".3.0"
2546+
- ".3.2"
2547+
- ".3.4"
2548+
2549+
- matrix_name: "tests-windows-python-version-3.10"
2550+
matrix_spec:
2551+
platform: windows-64-vsMulti-small
2552+
python-version-windows: ["3.10"]
2553+
auth: "auth"
2554+
ssl: "nossl"
2555+
display_name: "${platform} ${python-version-windows} ${auth} ${ssl}"
2556+
tasks:
2557+
- ".2.6"
2558+
- ".3.0"
2559+
- ".3.2"
2560+
- ".3.4"
25362561

25372562
- matrix_name: "tests-windows-python-version-32-bit"
25382563
matrix_spec:
@@ -2541,6 +2566,31 @@ buildvariants:
25412566
auth-ssl: "*"
25422567
display_name: "${platform} ${python-version-windows-32} ${auth-ssl}"
25432568
tasks: *all-server-versions
2569+
rules:
2570+
# Python 3.10+ and MongoDB <= 3.4 don't have any TLS ciphers in common.
2571+
- if:
2572+
platform: "*"
2573+
python-version-windows-32: "3.10"
2574+
auth-ssl: "auth-ssl"
2575+
then:
2576+
remove_tasks:
2577+
- ".2.6"
2578+
- ".3.0"
2579+
- ".3.2"
2580+
- ".3.4"
2581+
2582+
- matrix_name: "tests-windows-python-version-3.10"
2583+
matrix_spec:
2584+
platform: windows-64-vsMulti-small
2585+
python-version-windows-32: ["3.10"]
2586+
auth: "auth"
2587+
ssl: "nossl"
2588+
display_name: "${platform} ${python-version-windows-32} ${auth} ${ssl}"
2589+
tasks:
2590+
- ".2.6"
2591+
- ".3.0"
2592+
- ".3.2"
2593+
- ".3.4"
25442594

25452595
- matrix_name: "tests-python-version-supports-openssl-110-test-ssl"
25462596
matrix_spec:
@@ -2564,6 +2614,16 @@ buildvariants:
25642614
encryption: "*"
25652615
display_name: "Encryption ${platform} ${python-version-windows} ${auth-ssl}"
25662616
tasks: *encryption-server-versions
2617+
rules:
2618+
# Python 3.10+ and MongoDB <= 3.4 don't have any TLS ciphers in common.
2619+
- if:
2620+
platform: "*"
2621+
python-version-windows: "3.10"
2622+
auth-ssl: "auth-ssl"
2623+
encryption: "*"
2624+
then:
2625+
remove_tasks:
2626+
- ".2.6"
25672627

25682628
# Storage engine tests on Amazon1 (x86_64) with Python 2.7.
25692629
- matrix_name: "tests-storage-engines"

doc/examples/tls.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,19 @@ revocation checking failed::
249249
[('SSL routines', 'tls_process_initial_server_flight', 'invalid status response')]
250250

251251
See :ref:`OCSP` for more details.
252+
253+
Python 3.10+ is incompatible with TLS/SSL on MongoDB <= 3.4
254+
...........................................................
255+
256+
Note that Python 3.10+ is incompatible with TLS/SSL on MongoDB <= 3.4. The
257+
following are some example errors that may occur with this combination::
258+
259+
SSL handshake failed: localhost:27017: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)
260+
SSL handshake failed: localhost:27017: EOF occurred in violation of protocol (_ssl.c:997)
261+
262+
The MongoDB server logs will show the following error::
263+
264+
2021-06-30T21:22:44.917+0100 E NETWORK [conn16] SSL: error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher
265+
266+
To resolve this issue, use Python <=3.10, upgrade to MongoDB 3.6+, or install
267+
pymongo with the :ref:`OCSP` extra which relies on PyOpenSSL.

0 commit comments

Comments
 (0)