Skip to content

Commit e143f47

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 0ce7e7d + 1f22139 commit e143f47

File tree

5 files changed

+80
-1
lines changed

5 files changed

+80
-1
lines changed

.evergreen/config.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ functions:
116116
content_type: text/html
117117
display_name: "Coverage Report HTML"
118118

119-
120119
"upload mo artifacts":
121120
- command: ec2.assume_role
122121
params:
@@ -300,6 +299,15 @@ functions:
300299
- .evergreen/scripts/run-with-env.sh
301300
- .evergreen/scripts/run-tests.sh
302301

302+
"run direct tests":
303+
- command: subprocess.exec
304+
type: test
305+
params:
306+
working_dir: "src"
307+
binary: bash
308+
include_expansions_in_env: ["PYTHON_BINARY"]
309+
args: [ .evergreen/scripts/run-direct-tests.sh ]
310+
303311
"run enterprise auth tests":
304312
- command: subprocess.exec
305313
type: test
@@ -920,6 +928,15 @@ tasks:
920928
commands:
921929
- func: "run tests"
922930

931+
- name: "free-threading"
932+
tags: ["free-threading"]
933+
commands:
934+
- func: "bootstrap mongo-orchestration"
935+
vars:
936+
VERSION: "8.0"
937+
TOPOLOGY: "replica_set"
938+
- func: "run direct tests"
939+
923940
- name: "atlas-connect"
924941
tags: ["atlas-connect"]
925942
commands:

.evergreen/generated_configs/variants.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,32 @@ buildvariants:
627627
AUTH: auth
628628
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3
629629

630+
# Free threaded tests
631+
- name: free-threaded-rhel8-python3.13t
632+
tasks:
633+
- name: .free-threading
634+
display_name: Free-threaded RHEL8 Python3.13t
635+
run_on:
636+
- rhel87-small
637+
expansions:
638+
PYTHON_BINARY: /opt/python/3.13t/bin/python3
639+
- name: free-threaded-macos-python3.13t
640+
tasks:
641+
- name: .free-threading
642+
display_name: Free-threaded macOS Python3.13t
643+
run_on:
644+
- macos-14
645+
expansions:
646+
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
647+
- name: free-threaded-macos-arm64-python3.13t
648+
tasks:
649+
- name: .free-threading
650+
display_name: Free-threaded macOS Arm64 Python3.13t
651+
run_on:
652+
- macos-14-arm64
653+
expansions:
654+
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
655+
630656
# Green framework tests
631657
- name: green-eventlet-rhel8-python3.9
632658
tasks:

.evergreen/scripts/generate_config.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,16 @@ def get_python_binary(python: str, host: Host) -> str:
146146
else:
147147
base = "C:/python"
148148
python = python.replace(".", "")
149+
if python == "313t":
150+
return f"{base}/Python313/python3.13t.exe"
149151
return f"{base}/Python{python}/python.exe"
150152

151153
if name in ["rhel8", "ubuntu22", "ubuntu20", "rhel7"]:
152154
return f"/opt/python/{python}/bin/python3"
153155

154156
if name in ["macos", "macos-arm64"]:
157+
if python == "3.13t":
158+
return "/Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t"
155159
return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/python3"
156160

157161
raise ValueError(f"no match found for python {python} on {name}")
@@ -318,6 +322,21 @@ def create_server_variants() -> list[BuildVariant]:
318322
return variants
319323

320324

325+
def create_free_threaded_variants() -> list[BuildVariant]:
326+
variants = []
327+
for host_name in ("rhel8", "macos", "macos-arm64", "win64"):
328+
if host_name == "win64":
329+
# TODO: PYTHON-5027
330+
continue
331+
tasks = [".free-threading"]
332+
host = HOSTS[host_name]
333+
python = "3.13t"
334+
display_name = get_display_name("Free-threaded", host, python=python)
335+
variant = create_variant(tasks, display_name, python=python, host=host)
336+
variants.append(variant)
337+
return variants
338+
339+
321340
def create_encryption_variants() -> list[BuildVariant]:
322341
variants = []
323342
tags = ["encryption_tag"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -x
3+
. .evergreen/utils.sh
4+
5+
. .evergreen/scripts/env.sh
6+
createvirtualenv "$PYTHON_BINARY" .venv
7+
8+
export PYMONGO_C_EXT_MUST_BUILD=1
9+
pip install -e ".[test]"
10+
pytest -v

doc/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Changes in Version 4.11.0 (YYYY/MM/DD)
77
.. warning:: PyMongo 4.11 drops support for Python 3.8: Python 3.9+ or PyPy 3.9+ is now required.
88
.. warning:: PyMongo 4.11 drops support for MongoDB 3.6. PyMongo now supports MongoDB 4.0+.
99
Driver support for MongoDB 3.6 reached end of life in April 2024.
10+
.. warning:: Driver support for MongoDB 4.0 reaches end of life in April 2025.
11+
A future minor release of PyMongo will raise the minimum supported MongoDB Server version from 4.0 to 4.2.
12+
This is in accordance with [MongoDB Software Lifecycle Schedules](https://www.mongodb.com/legal/support-policy/lifecycles).
13+
**Support for MongoDB Server 4.0 will be dropped in a future release!**
1014

1115
PyMongo 4.11 brings a number of changes including:
1216

@@ -16,6 +20,7 @@ PyMongo 4.11 brings a number of changes including:
1620
- pymongocrypt>=1.12 is now required for :ref:`In-Use Encryption` support.
1721
- Added support for free-threaded Python with the GIL disabled. For more information see:
1822
`Free-threaded CPython <https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-free-threaded-cpython>`_.
23+
We do not yet support free-threaded Python on Windows (`PYTHON-5027`_) or with In-Use Encryption (`PYTHON-5024`_).
1924
- :attr:`~pymongo.asynchronous.mongo_client.AsyncMongoClient.address` and
2025
:attr:`~pymongo.mongo_client.MongoClient.address` now correctly block when called on unconnected clients
2126
until either connection succeeds or a server selection timeout error is raised.
@@ -42,6 +47,8 @@ See the `PyMongo 4.11 release notes in JIRA`_ for the list of resolved issues
4247
in this release.
4348

4449
.. _PyMongo 4.11 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=40784
50+
.. _PYTHON-5027: https://jira.mongodb.org/browse/PYTHON-5027
51+
.. _PYTHON-5024: https://jira.mongodb.org/browse/PYTHON-5024
4552

4653
Changes in Version 4.10.1 (2024/10/01)
4754
--------------------------------------

0 commit comments

Comments
 (0)