Skip to content

Commit 53c4694

Browse files
authored
PYTHON-5233 Allow python version to be set at the task level (#2228)
1 parent 3a3f3d2 commit 53c4694

File tree

7 files changed

+132
-95
lines changed

7 files changed

+132
-95
lines changed

.evergreen/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ functions:
206206
params:
207207
binary: bash
208208
working_dir: "src"
209-
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, PYTHON_BINARY,
209+
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, PYTHON_BINARY, PYTHON_VERSION,
210210
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED, AUTH_AWS, LOAD_BALANCER]
211211
args: [.evergreen/just.sh, run-server, "${TEST_NAME}"]
212212
- command: expansions.update
@@ -227,7 +227,7 @@ functions:
227227
type: test
228228
params:
229229
include_expansions_in_env: [AUTH, SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
230-
AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI,
230+
AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI, PYTHON_VERSION,
231231
DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS, MONGODB_API_VERSION, DEBUG_LOG,
232232
ORCHESTRATION_FILE, OCSP_SERVER_TYPE]
233233
binary: bash

.evergreen/generated_configs/tasks.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,18 +723,48 @@ tasks:
723723
tags: [doctests]
724724

725725
# Enterprise auth tests
726-
- name: test-enterprise-auth
726+
- name: test-enterprise-auth-python3.9
727727
commands:
728728
- func: run server
729729
vars:
730730
TEST_NAME: enterprise_auth
731731
AUTH: auth
732+
PYTHON_VERSION: "3.9"
732733
- func: assume ec2 role
733734
- func: run tests
734735
vars:
735736
TEST_NAME: enterprise_auth
736737
AUTH: auth
738+
PYTHON_VERSION: "3.9"
737739
tags: [enterprise_auth]
740+
- name: test-enterprise-auth-python3.13
741+
commands:
742+
- func: run server
743+
vars:
744+
TEST_NAME: enterprise_auth
745+
AUTH: auth
746+
PYTHON_VERSION: "3.13"
747+
- func: assume ec2 role
748+
- func: run tests
749+
vars:
750+
TEST_NAME: enterprise_auth
751+
AUTH: auth
752+
PYTHON_VERSION: "3.13"
753+
tags: [enterprise_auth]
754+
- name: test-enterprise-auth-pypy3.10
755+
commands:
756+
- func: run server
757+
vars:
758+
TEST_NAME: enterprise_auth
759+
AUTH: auth
760+
PYTHON_VERSION: pypy3.10
761+
- func: assume ec2 role
762+
- func: run tests
763+
vars:
764+
TEST_NAME: enterprise_auth
765+
AUTH: auth
766+
PYTHON_VERSION: pypy3.10
767+
tags: [enterprise_auth, pypy]
738768

739769
# Free threading tests
740770
- name: test-free-threading

.evergreen/generated_configs/variants.yml

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -507,54 +507,24 @@ buildvariants:
507507
tags: [encryption_tag]
508508

509509
# Enterprise auth tests
510-
- name: auth-enterprise-macos-python3.9
510+
- name: auth-enterprise-macos
511511
tasks:
512-
- name: .enterprise_auth
513-
display_name: Auth Enterprise macOS Python3.9
512+
- name: .enterprise_auth !.pypy
513+
display_name: Auth Enterprise macOS
514514
run_on:
515515
- macos-14
516-
expansions:
517-
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
518-
- name: auth-enterprise-rhel8-python3.10
519-
tasks:
520-
- name: .enterprise_auth
521-
display_name: Auth Enterprise RHEL8 Python3.10
522-
run_on:
523-
- rhel87-small
524-
expansions:
525-
PYTHON_BINARY: /opt/python/3.10/bin/python3
526-
- name: auth-enterprise-rhel8-python3.11
527-
tasks:
528-
- name: .enterprise_auth
529-
display_name: Auth Enterprise RHEL8 Python3.11
530-
run_on:
531-
- rhel87-small
532-
expansions:
533-
PYTHON_BINARY: /opt/python/3.11/bin/python3
534-
- name: auth-enterprise-rhel8-python3.12
516+
- name: auth-enterprise-win64
535517
tasks:
536-
- name: .enterprise_auth
537-
display_name: Auth Enterprise RHEL8 Python3.12
538-
run_on:
539-
- rhel87-small
540-
expansions:
541-
PYTHON_BINARY: /opt/python/3.12/bin/python3
542-
- name: auth-enterprise-win64-python3.13
543-
tasks:
544-
- name: .enterprise_auth
545-
display_name: Auth Enterprise Win64 Python3.13
518+
- name: .enterprise_auth !.pypy
519+
display_name: Auth Enterprise Win64
546520
run_on:
547521
- windows-64-vsMulti-small
548-
expansions:
549-
PYTHON_BINARY: C:/python/Python313/python.exe
550-
- name: auth-enterprise-rhel8-pypy3.10
522+
- name: auth-enterprise-rhel8
551523
tasks:
552524
- name: .enterprise_auth
553-
display_name: Auth Enterprise RHEL8 PyPy3.10
525+
display_name: Auth Enterprise RHEL8
554526
run_on:
555527
- rhel87-small
556-
expansions:
557-
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
558528

559529
# Free threaded tests
560530
- name: free-threaded-rhel8-python3.13t

0 commit comments

Comments
 (0)