Skip to content

Commit 50f50f9

Browse files
blink1073NoahStapp
andauthored
DRIVERS-3077 Drop support for Python 3.8 (#567)
Co-authored-by: Noah Stapp <[email protected]>
1 parent 81c6b49 commit 50f50f9

File tree

11 files changed

+55
-69
lines changed

11 files changed

+55
-69
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,6 @@ buildvariants:
13811381
display_name: Docker
13821382
run_on:
13831383
- ubuntu2204-small
1384-
- macos-14
13851384
tasks:
13861385
- ".docker" # Run all tasks with the "docker" tag
13871386

.evergreen/docker/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,13 @@ Note that the default `TOPOLOGY` is [`servers`](https://github.com/mongodb-labs/
4545
TOPOLOGY=replica_set ORCHESTRATION_FILE=auth.json bash ./run-server.sh
4646
```
4747

48-
If you want to test server versions older than 4.4, you can use the 18.04 image, e.g.:
48+
If you want to test server versions older than 4.4, you can use the rhel8 image, e.g.:
4949

50-
```bash
51-
TOPOLOGY=sharded_cluster MONGODB_VERSION=4.2 TARGET_IMAGE=ubuntu18.04 ./run-server.sh
52-
```
53-
54-
You must also specify `ARCH=amd64` in order to run MongoDB 3.6 and 4.0, since `aarch` support
55-
is not available in Ubuntu 18.04 for those versions.
50+
You must also specify `ARCH=amd64` in order to run MongoDB versions older than 4.4 on RHEL8, since `aarch` support
51+
is not available in RHEL8 for those versions.
5652

5753
```bash
58-
ARCH=amd64 TOPOLOGY=sharded_cluster MONGODB_VERSION=3.6 TARGET_IMAGE=ubuntu18.04 ./run-server.sh
54+
ARCH=amd64 TOPOLOGY=sharded_cluster MONGODB_VERSION=4.2 TARGET_IMAGE=rhel8 ./run-server.sh
5955
```
6056

6157
### Get Logs

.evergreen/docker/rhel8/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM registry.access.redhat.com/ubi8/ubi:8.4
2+
3+
# Install mongodb 4.4 server to get older deps.
4+
RUN echo -e "\
5+
[mongodb-enterprise-4.4] \n\
6+
name=MongoDB Enterprise Repository \n\
7+
baseurl=https://repo.mongodb.com/yum/redhat/8/mongodb-enterprise/4.4/$(uname -m)/ \n\
8+
enabled = 1 \n\
9+
gpgkey=https://pgp.mongodb.com/server-4.4.asc \n\
10+
gpgcheck = 1\
11+
" > /etc/yum.repos.d/mongodb-enterprise-4.4.repo
12+
13+
RUN dnf update -y && \
14+
dnf install -y \
15+
git \
16+
ca-certificates \
17+
curl \
18+
wget \
19+
sudo \
20+
make \
21+
gnupg \
22+
python3.9 \
23+
mongodb-enterprise \
24+
lsof < /dev/null > /dev/null
25+
26+
# Alias python3 -> python3.9
27+
RUN ln -f -s /usr/bin/python3.9 /usr/bin/python3
28+
29+
ARG USER_ID
30+
ARG GROUP_ID
31+
32+
ENV DRIVERS_TOOLS=/root/drivers-tools
33+
ENV MONGO_ORCHESTRATION_HOME=/root/drivers-tools/.evergreen/orchestration
34+
ENV MONGODB_BINARIES=/root/drivers-tools/mongodb/bin
35+
ENV DOCKER_RUNNING=true
36+
37+
COPY . /root/drivers-tools
38+
COPY .evergreen/docker/rhel8/*.sh /root

.evergreen/docker/ubuntu18.04/Dockerfile

Lines changed: 0 additions & 55 deletions
This file was deleted.

.evergreen/docker/ubuntu20.04/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
1010
sudo \
1111
gnupg \
1212
python \
13-
python3 \
14-
python3.8-venv \
1513
lsof \
1614
software-properties-common \
1715
libsnmp35 \
1816
net-tools < /dev/null > /dev/null \
1917
&& rm -rf /var/lib/apt/lists/*
2018

19+
# Install python 3.9 from ppa
20+
RUN export DEBIAN_FRONTEND=noninteractive \
21+
&& export TZ=Etc/UTC \
22+
&& add-apt-repository ppa:deadsnakes/ppa \
23+
&& apt-get -qq update \
24+
&& apt-get -qq -y install python3.9 python3.9-venv python3-venv < /dev/null > /dev/null \
25+
&& ln -sf /usr/bin/python3.9 /usr/bin/python3 \
26+
&& rm -rf /var/lib/apt/lists/*
27+
2128
ARG USER_ID
2229
ARG GROUP_ID
2330

.evergreen/find-python3.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ is_python3() (
5757
return 1
5858
fi
5959

60+
# The minimum version we support is Python 3.9. All other versions are EOL.
6061
# shellcheck disable=SC2091
61-
if ! $("$bin" -c "import sys; exit(sys.version_info[0] == 3 and sys.version_info[1] < 8)"); then
62+
if ! $("$bin" -c "import sys; exit(sys.version_info[0] == 3 and sys.version_info[1] < 9)"); then
6263
version=$($bin --version)
6364
echo "Detected EOL Python ${version}, skipping."
6465
return 1

.evergreen/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66
name = "drivers-evergreen-tools"
77
version = "0.1.0"
88
description = 'Scripts for drivers-evergreen-tools'
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.9"
1010
license = "MIT"
1111
keywords = []
1212
authors = [

.evergreen/tests/test-csfle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [[ "$(uname -s)" == CYGWIN* ]]; then
2929
fi
3030

3131
# Test with supported pythons
32-
pythons="3.8 3.9 3.10 3.11 3.12 3.13"
32+
pythons="3.9 3.10 3.11 3.12 3.13"
3333
for python in $pythons; do
3434
if [ "$(uname -s)" = "Darwin" ]; then
3535
PYTHON_BINARY="/Library/Frameworks/Python.Framework/Versions/$python/bin/python3"

0 commit comments

Comments
 (0)