Skip to content

Commit ff42b6c

Browse files
committed
wip
1 parent 1792268 commit ff42b6c

6 files changed

Lines changed: 34 additions & 36 deletions

File tree

.evergreen/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ tasks:
563563
commands:
564564
- func: "fetch source"
565565
- func: "build python release"
566-
vars: { PYTHON: /opt/python/3.8/bin/python3 }
566+
vars: { PYTHON: /opt/python/3.10/bin/python3 }
567567
- func: "upload python release"
568568

569569
- name: "release-python-windows"
@@ -572,7 +572,7 @@ tasks:
572572
commands:
573573
- func: "fetch source"
574574
- func: "build python release"
575-
vars: { PYTHON: C:/python/Python38/python.exe }
575+
vars: { PYTHON: C:/python/Python310/python.exe }
576576
- func: "upload python release"
577577

578578
- name: "release-python-combine"

.github/workflows/test-python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
os: [ubuntu-latest, windows-latest, macos-latest]
46-
python-version: ["3.8", "3.13"]
46+
python-version: ["3.10", "3.13", "3.14t"]
4747

4848
steps:
4949
- uses: actions/checkout@v4
@@ -57,7 +57,7 @@ jobs:
5757
python-version: ${{ matrix.python-version }}
5858
- name: Build and test dist files
5959
run: |
60-
if [ "${{ matrix.python-version }}" == "3.13" ]; then
60+
if [ "${{ matrix.python-version }}" == "3.14" ]; then
6161
export PIP_PRE=1
6262
fi
6363
export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt)

bindings/python/.evergreen/test.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,26 @@ if [ "Windows_NT" = "$OS" ]; then # Magic variable in cygwin
1818
PYMONGOCRYPT_LIB=${MONGOCRYPT_DIR}/nocrypto/bin/mongocrypt.dll
1919
PYMONGOCRYPT_LIB_CRYPTO=$(cygpath -m ${MONGOCRYPT_DIR}/bin/mongocrypt.dll)
2020
export PYMONGOCRYPT_LIB=$(cygpath -m $PYMONGOCRYPT_LIB)
21-
PYTHONS=("C:/python/Python38/python.exe"
22-
"C:/python/Python39/python.exe"
21+
PYTHONS=("C:/python/Python39/python.exe"
2322
"C:/python/Python310/python.exe"
2423
"C:/python/Python311/python.exe"
25-
"C:/python/Python312/python.exe")
24+
"C:/python/Python312/python.exe"
25+
"C:/python/Python313/python.exe"
26+
"C:/python/Python314/python.exe"
27+
"C:/python/Python314/python3.14t.exe")
2628
export CRYPT_SHARED_PATH=../crypt_shared/bin/mongo_crypt_v1.dll
2729
C:/python/Python310/python.exe drivers-evergreen-tools/.evergreen/mongodl.py --component crypt_shared \
2830
--version latest --out ../crypt_shared/
2931
elif [ "Darwin" = "$(uname -s)" ]; then
3032
export PYMONGOCRYPT_LIB=${MONGOCRYPT_DIR}/nocrypto/lib/libmongocrypt.dylib
3133
PYMONGOCRYPT_LIB_CRYPTO=${MONGOCRYPT_DIR}/lib/libmongocrypt.dylib
3234
PYTHONS=(
33-
"/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
3435
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
3536
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
3637
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3"
38+
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3"
39+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3"
40+
"/Library/Frameworks/PythonT.framework/Versions/3.14/bin/python3"
3741
)
3842

3943
export CRYPT_SHARED_PATH="../crypt_shared/lib/mongo_crypt_v1.dylib"
@@ -55,12 +59,13 @@ else
5559
"/opt/mongodbtoolchain/v4/bin/python3"
5660
)
5761
else
58-
PYTHONS=("/opt/python/3.8/bin/python3"
59-
"/opt/python/3.9/bin/python3"
62+
PYTHONS=(
6063
"/opt/python/3.10/bin/python3"
6164
"/opt/python/3.11/bin/python3"
6265
"/opt/python/3.12/bin/python3"
6366
"/opt/python/3.13/bin/python3"
67+
"/opt/python/3.14/bin/python3"
68+
"/opt/python/3.14t/bin/python3"
6469
)
6570
fi
6671
/opt/mongodbtoolchain/v3/bin/python3 drivers-evergreen-tools/.evergreen/mongodl.py --component \
@@ -72,7 +77,7 @@ for PYTHON_BINARY in "${PYTHONS[@]}"; do
7277
$PYTHON_BINARY -c 'import sys; print(sys.version)'
7378
git clean -dffx
7479
createvirtualenv $PYTHON_BINARY .venv
75-
python -m pip install --prefer-binary -v -e ".[test]"
80+
python -m pip install --prefer-binary -v -e ".[test]" || python -m pip install --pre --prefer-binary -v -e ".[test]"
7681
echo "Running tests with crypto enabled libmongocrypt..."
7782
PYMONGOCRYPT_LIB=$PYMONGOCRYPT_LIB_CRYPTO python -c 'from pymongocrypt.binding import lib;assert lib.mongocrypt_is_crypto_available(), "mongocrypt_is_crypto_available() returned False"'
7883
PYMONGOCRYPT_LIB=$PYMONGOCRYPT_LIB_CRYPTO python -m pytest -v --ignore=test/performance .

bindings/python/.evergreen/utils.sh

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,47 +36,41 @@ createvirtualenv () {
3636
# PYTHON = find_python3
3737
find_python3() {
3838
PYTHON=""
39-
# Add a fallback system python3 if it is available and Python 3.8+.
40-
if is_python_38 "$(command -v python3)"; then
39+
# Add a fallback system python3 if it is available and Python 3.10+.
40+
if is_python_310 "$(command -v python3)"; then
4141
PYTHON="$(command -v python3)"
4242
fi
4343
# Find a suitable toolchain version, if available.
4444
if [ "$(uname -s)" = "Darwin" ]; then
45-
# macos 11.00
46-
if [ -d "/Library/Frameworks/Python.Framework/Versions/3.10" ]; then
47-
PYTHON="/Library/Frameworks/Python.Framework/Versions/3.10/bin/python3"
48-
# macos 10.14
49-
elif [ -d "/Library/Frameworks/Python.Framework/Versions/3.8" ]; then
50-
PYTHON="/Library/Frameworks/Python.Framework/Versions/3.8/bin/python3"
51-
fi
45+
PYTHON="/Library/Frameworks/Python.Framework/Versions/3.10/bin/python3"
5246
elif [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
53-
PYTHON="C:/python/Python38/python.exe"
47+
PYTHON="C:/python/Python310/python.exe"
5448
else
55-
# Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.8+.
56-
if [ -f "/opt/python/3.8/bin/python3" ]; then
57-
PYTHON="/opt/python/3.8/bin/python3"
58-
elif is_python_38 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then
49+
# Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.10+.
50+
if [ -f "/opt/python/3.10/bin/python3" ]; then
51+
PYTHON="/opt/python/3.10/bin/python3"
52+
elif is_python_310 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then
5953
PYTHON="/opt/mongodbtoolchain/v4/bin/python3"
60-
elif is_python_38 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then
54+
elif is_python_310 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then
6155
PYTHON="/opt/mongodbtoolchain/v3/bin/python3"
6256
fi
6357
fi
6458
if [ -z "$PYTHON" ]; then
65-
echo "Cannot run pre-commit without python3.8+ installed!"
59+
echo "Cannot run pre-commit without python3.10+ installed!"
6660
exit 1
6761
fi
6862
echo "$PYTHON"
6963
}
7064

71-
# Function that returns success if the provided Python binary is version 3.8 or later
65+
# Function that returns success if the provided Python binary is version 3.10 or later
7266
# Usage:
73-
# is_python_38 /path/to/python
67+
# is_python_310 /path/to/python
7468
# * param1: Python binary
75-
is_python_38() {
69+
is_python_310() {
7670
if [ -z "$1" ]; then
7771
return 1
78-
elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 8))"; then
79-
# runs when sys.version_info[:2] >= (3, 8)
72+
elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 10))"; then
73+
# runs when sys.version_info[:2] >= (3, 10)
8074
return 0
8175
else
8276
return 1

bindings/python/pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version", "dependencies", "optional-dependencies"]
88
description = "Python bindings for libmongocrypt"
99
readme = "README.rst"
1010
license = {file="LICENSE"}
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.10"
1212
authors = [
1313
{ name = "Shane Harvey", email = "mongodb-user@googlegroups.com" },
1414
]
@@ -29,14 +29,13 @@ classifiers = [
2929
"Operating System :: POSIX",
3030
"Programming Language :: Python :: 3",
3131
"Programming Language :: Python :: 3 :: Only",
32-
"Programming Language :: Python :: 3.8",
33-
"Programming Language :: Python :: 3.9",
3432
"Programming Language :: Python :: Implementation :: CPython",
3533
"Programming Language :: Python :: Implementation :: PyPy",
3634
"Programming Language :: Python :: 3.10",
3735
"Programming Language :: Python :: 3.11",
3836
"Programming Language :: Python :: 3.12",
3937
"Programming Language :: Python :: 3.13",
38+
"Programming Language :: Python :: 3.14",
4039
"Topic :: Database",
4140
]
4241

bindings/python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cffi>=1.12.0,<2
1+
cffi>=1.12.0,<3;python_version<"3.14"
22
cryptography>=40
33
packaging>=21.0
44
httpx>=0.25.0

0 commit comments

Comments
 (0)