Skip to content

Commit d3da880

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 4ce19a1 + d47bd9c commit d3da880

File tree

9 files changed

+561
-476
lines changed

9 files changed

+561
-476
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 357 additions & 187 deletions
Large diffs are not rendered by default.

.evergreen/generated_configs/variants.yml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ buildvariants:
244244
# Enterprise auth tests
245245
- name: auth-enterprise-rhel8
246246
tasks:
247-
- name: .test-non-standard .auth
247+
- name: .test-non-standard .auth !.free-threaded
248248
display_name: Auth Enterprise RHEL8
249249
run_on:
250250
- rhel87-small
@@ -253,7 +253,7 @@ buildvariants:
253253
AUTH: auth
254254
- name: auth-enterprise-macos
255255
tasks:
256-
- name: .test-non-standard !.pypy .auth
256+
- name: .test-non-standard !.pypy .auth !.free-threaded
257257
display_name: Auth Enterprise macOS
258258
run_on:
259259
- macos-14
@@ -270,48 +270,10 @@ buildvariants:
270270
TEST_NAME: enterprise_auth
271271
AUTH: auth
272272

273-
# Free threaded tests
274-
- name: free-threaded-rhel8-python3.14t
275-
tasks:
276-
- name: .free-threading
277-
display_name: Free-threaded RHEL8 Python3.14t
278-
run_on:
279-
- rhel87-small
280-
expansions:
281-
PYTHON_BINARY: /opt/python/3.14t/bin/python3
282-
tags: [pr]
283-
- name: free-threaded-macos-python3.14t
284-
tasks:
285-
- name: .free-threading
286-
display_name: Free-threaded macOS Python3.14t
287-
run_on:
288-
- macos-14
289-
expansions:
290-
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.14/bin/python3t
291-
tags: []
292-
- name: free-threaded-macos-arm64-python3.14t
293-
tasks:
294-
- name: .free-threading
295-
display_name: Free-threaded macOS Arm64 Python3.14t
296-
run_on:
297-
- macos-14-arm64
298-
expansions:
299-
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.14/bin/python3t
300-
tags: []
301-
- name: free-threaded-win64-python3.14t
302-
tasks:
303-
- name: .free-threading
304-
display_name: Free-threaded Win64 Python3.14t
305-
run_on:
306-
- windows-64-vsMulti-small
307-
expansions:
308-
PYTHON_BINARY: C:/python/Python314/python3.14t.exe
309-
tags: []
310-
311273
# Green framework tests
312274
- name: green-gevent-rhel8
313275
tasks:
314-
- name: .test-standard .sync
276+
- name: .test-standard .sync !.free-threaded
315277
display_name: Green Gevent RHEL8
316278
run_on:
317279
- rhel87-small

.evergreen/scripts/generate_config.py

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,6 @@ def create_standard_nonlinux_variants() -> list[BuildVariant]:
109109
return variants
110110

111111

112-
def create_free_threaded_variants() -> list[BuildVariant]:
113-
variants = []
114-
for host_name in ("rhel8", "macos", "macos-arm64", "win64"):
115-
python = "3.14t"
116-
tasks = [".free-threading"]
117-
tags = []
118-
if host_name == "rhel8":
119-
tags.append("pr")
120-
host = HOSTS[host_name]
121-
display_name = get_variant_name("Free-threaded", host, python=python)
122-
variant = create_variant(tasks, display_name, tags=tags, python=python, host=host)
123-
variants.append(variant)
124-
return variants
125-
126-
127112
def create_encryption_variants() -> list[BuildVariant]:
128113
variants = []
129114
tags = ["encryption_tag"]
@@ -217,8 +202,11 @@ def create_enterprise_auth_variants():
217202
for host in ["rhel8", "macos", "win64"]:
218203
expansions = dict(TEST_NAME="enterprise_auth", AUTH="auth")
219204
display_name = get_variant_name("Auth Enterprise", host)
220-
tasks = [".test-non-standard .auth"]
221-
if host != "rhel8":
205+
tasks = [".test-non-standard .auth !.free-threaded"]
206+
# https://jira.mongodb.org/browse/PYTHON-5586
207+
if host == "macos":
208+
tasks = [".test-non-standard !.pypy .auth !.free-threaded"]
209+
if host == "win64":
222210
tasks = [".test-non-standard !.pypy .auth"]
223211
variant = create_variant(tasks, display_name, host=host, expansions=expansions)
224212
variants.append(variant)
@@ -302,7 +290,7 @@ def create_green_framework_variants():
302290
variants = []
303291
host = DEFAULT_HOST
304292
for framework in ["gevent"]:
305-
tasks = [".test-standard .sync"]
293+
tasks = [".test-standard .sync !.free-threaded"]
306294
expansions = dict(GREEN_FRAMEWORK=framework)
307295
display_name = get_variant_name(f"Green {framework.capitalize()}", host)
308296
variant = create_variant(tasks, display_name, host=host, expansions=expansions)
@@ -540,7 +528,9 @@ def create_server_version_tasks():
540528
seen.add(combo)
541529
tags.append("pr")
542530
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology)
543-
if python not in PYPYS:
531+
if "t" in python:
532+
tags.append("free-threaded")
533+
if python not in PYPYS and "t" not in python:
544534
expansions["COVERAGE"] = "1"
545535
name = get_task_name(
546536
"test-server-version",
@@ -596,6 +586,8 @@ def create_test_non_standard_tasks():
596586
f"{topology}-{auth}-{ssl}",
597587
auth,
598588
]
589+
if "t" in python:
590+
tags.append("free-threaded")
599591
if python in PYPYS:
600592
tags.append("pypy")
601593
if pr:
@@ -646,6 +638,8 @@ def create_standard_tasks():
646638
f"{topology}-{auth}-{ssl}",
647639
sync,
648640
]
641+
if "t" in python:
642+
tags.append("free-threaded")
649643
if python in PYPYS:
650644
tags.append("pypy")
651645
if pr:
@@ -716,6 +710,8 @@ def create_aws_tasks():
716710
server_func = FunctionCall(func="run server", vars=server_vars)
717711
assume_func = FunctionCall(func="assume ec2 role")
718712
tags = [*base_tags, f"auth-aws-{test_type}"]
713+
if "t" in python:
714+
tags.append("free-threaded")
719715
name = get_task_name(f"{base_name}-{test_type}", python=python)
720716
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, PYTHON_VERSION=python)
721717
test_func = FunctionCall(func="run tests", vars=test_vars)
@@ -731,6 +727,8 @@ def create_aws_tasks():
731727
AWS_ROLE_SESSION_NAME="test",
732728
PYTHON_VERSION=python,
733729
)
730+
if "t" in python:
731+
tags.append("free-threaded")
734732
test_func = FunctionCall(func="run tests", vars=test_vars)
735733
funcs = [server_func, assume_func, test_func]
736734
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
@@ -757,6 +755,8 @@ def create_mod_wsgi_tasks():
757755
for (test, topology), python in zip_cycle(
758756
product(["standalone", "embedded-mode"], ["standalone", "replica_set"]), CPYTHONS
759757
):
758+
if "t" in python:
759+
continue
760760
if test == "standalone":
761761
task_name = "mod-wsgi-"
762762
else:
@@ -930,15 +930,6 @@ def create_ocsp_tasks():
930930
return tasks
931931

932932

933-
def create_free_threading_tasks():
934-
vars = dict(VERSION="8.0", TOPOLOGY="replica_set")
935-
server_func = FunctionCall(func="run server", vars=vars)
936-
test_func = FunctionCall(func="run tests")
937-
task_name = "test-free-threading"
938-
tags = ["free-threading"]
939-
return [EvgTask(name=task_name, tags=tags, commands=[server_func, test_func])]
940-
941-
942933
##############
943934
# Functions
944935
##############

.evergreen/scripts/generate_config_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
##############
2323

2424
ALL_VERSIONS = ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"]
25-
CPYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
25+
CPYTHONS = ["3.10", "3.11", "3.12", "3.13", "3.14t", "3.14"]
2626
PYPYS = ["pypy3.10"]
2727
ALL_PYTHONS = CPYTHONS + PYPYS
2828
MIN_MAX_PYTHON = [CPYTHONS[0], CPYTHONS[-1]]

.evergreen/utils.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,17 @@ is_python_310() {
120120
get_python_binary() {
121121
version=$1
122122
if [ "$(uname -s)" = "Darwin" ]; then
123-
PYTHON="/Library/Frameworks/Python.Framework/Versions/$version/bin/python3"
123+
if [[ "$version" == *"t"* ]]; then
124+
binary_name="python3t"
125+
framework_dir="PythonT"
126+
else
127+
binary_name="python3"
128+
framework_dir="Python"
129+
fi
130+
version=$(echo "$version" | sed 's/t//g')
131+
PYTHON="/Library/Frameworks/$framework_dir.Framework/Versions/$version/bin/$binary_name"
124132
elif [ "Windows_NT" = "${OS:-}" ]; then
125-
version=$(echo $version | cut -d. -f1,2 | sed 's/\.//g')
133+
version=$(echo $version | cut -d. -f1,2 | sed 's/\.//g; s/t//g')
126134
if [ -n "${IS_WIN32:-}" ]; then
127135
PYTHON="C:/python/32/Python$version/python.exe"
128136
else

doc/changelog.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ PyMongo 4.16 brings a number of changes including:
1717
- Removed support for Eventlet.
1818
Eventlet is actively being sunset by its maintainers and has compatibility issues with PyMongo's dnspython dependency.
1919

20+
Changes in Version 4.15.2 (2025/10/01)
21+
--------------------------------------
22+
23+
Version 4.15.2 is a bug fix release.
24+
25+
- Add wheels for Python 3.14 and 3.14t that were missing from 4.15.0 release. Drop the 3.13t wheel.
26+
27+
Issues Resolved
28+
...............
29+
30+
See the `PyMongo 4.15.2 release notes in JIRA`_ for the list of resolved issues
31+
in this release.
32+
33+
.. _PyMongo 4.15.2 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=47186
34+
2035
Changes in Version 4.15.1 (2025/09/16)
2136
--------------------------------------
2237

doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@
8484
# so those link results in a 404.
8585
# wiki.centos.org has been flaky.
8686
# sourceforge.net is giving a 403 error, but is still accessible from the browser.
87+
# Links to release notes in jira give 401 error: unauthorized. PYTHON-5585
8788
linkcheck_ignore = [
8889
"https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check",
8990
"https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/transactions-convenient-api.md#handling-errors-inside-the-callback",
9091
"https://github.com/mongodb/libmongocrypt/blob/master/bindings/python/README.rst#installing-from-source",
9192
r"https://wiki.centos.org/[\w/]*",
9293
r"https://sourceforge.net/",
94+
r"https://jira\.mongodb\.org/secure/ReleaseNote\.jspa.*",
9395
]
9496

9597
# Allow for flaky links.

pymongo/network_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _is_ready(fut: Future[Any]) -> None:
103103

104104
while sent < len(buf):
105105
try:
106-
sent += sock.send(view[sent:]) # type:ignore[arg-type]
106+
sent += sock.send(view[sent:])
107107
except BLOCKING_IO_ERRORS as exc:
108108
fd = sock.fileno()
109109
# Check for closed socket.

0 commit comments

Comments
 (0)