Skip to content

Commit fc3ce9d

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 2329f91 + 9082a4b commit fc3ce9d

File tree

8 files changed

+25
-19
lines changed

8 files changed

+25
-19
lines changed

.evergreen/run-tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export PIP_QUIET=1 # Quiet by default
3737
export PIP_PREFER_BINARY=1 # Prefer binary dists by default
3838

3939
set +x
40-
PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())")
40+
PYTHON_IMPL=$(uv run --frozen python -c "import platform; print(platform.python_implementation())")
4141

4242
# Try to source local Drivers Secrets
4343
if [ -f ./secrets-export.sh ]; then
@@ -49,11 +49,11 @@ fi
4949

5050
# Start compiling the args we'll pass to uv.
5151
# Run in an isolated environment so as not to pollute the base venv.
52-
UV_ARGS=("--isolated --extra test")
52+
UV_ARGS=("--isolated --frozen --extra test")
5353

5454
# Ensure C extensions if applicable.
5555
if [ -z "${NO_EXT:-}" ] && [ "$PYTHON_IMPL" = "CPython" ]; then
56-
uv run tools/fail_if_no_c.py
56+
uv run --frozen tools/fail_if_no_c.py
5757
fi
5858

5959
if [ "$AUTH" != "noauth" ]; then
@@ -239,7 +239,7 @@ if [ -n "$PERF_TEST" ]; then
239239
fi
240240

241241
echo "Running $AUTH tests over $SSL with python $(uv python find)"
242-
uv run python -c 'import sys; print(sys.version)'
242+
uv run --frozen python -c 'import sys; print(sys.version)'
243243

244244

245245
# Run the tests, and store the results in Evergreen compatible XUnit XML

.evergreen/scripts/setup-dev-env.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ if [ ! -d $BIN_DIR ]; then
3232
echo "export UV_PYTHON=$UV_PYTHON" >> $HERE/env.sh
3333
fi
3434
echo "Using python $UV_PYTHON"
35-
uv sync
36-
uv run --with pip pip install -e .
35+
uv sync --frozen
36+
uv run --frozen --with pip pip install -e .
3737
echo "Setting up python environment... done."
3838

3939
# Ensure there is a pre-commit hook if there is a git checkout.
4040
if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then
41-
uv run pre-commit install
41+
uv run --frozen pre-commit install
4242
fi

.github/workflows/dist.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ jobs:
3535
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
3636
buildplat:
3737
- [ubuntu-20.04, "manylinux_x86_64", "cp3*-manylinux_x86_64"]
38-
- [ubuntu-20.04, "manylinux_aarch64", "cp3*-manylinux_aarch64"]
39-
- [ubuntu-20.04, "manylinux_ppc64le", "cp3*-manylinux_ppc64le"]
40-
- [ubuntu-20.04, "manylinux_s390x", "cp3*-manylinux_s390x"]
38+
- [ubuntu-24.04-arm, "manylinux_aarch64", "cp3*-manylinux_aarch64"]
39+
# Disabled pending PYTHON-5058
40+
# - [ubuntu-24.04, "manylinux_ppc64le", "cp3*-manylinux_ppc64le"]
41+
# - [ubuntu-24.04, "manylinux_s390x", "cp3*-manylinux_s390x"]
4142
- [ubuntu-20.04, "manylinux_i686", "cp3*-manylinux_i686"]
4243
- [windows-2019, "win_amd6", "cp3*-win_amd64"]
4344
- [windows-2019, "win32", "cp3*-win32"]

doc/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Changes in Version 4.11.0 (YYYY/MM/DD)
1111
A future minor release of PyMongo will raise the minimum supported MongoDB Server version from 4.0 to 4.2.
1212
This is in accordance with [MongoDB Software Lifecycle Schedules](https://www.mongodb.com/legal/support-policy/lifecycles).
1313
**Support for MongoDB Server 4.0 will be dropped in a future release!**
14+
.. warning:: This version does not include wheels for ``ppc64le`` or ``s390x`` architectures, see `PYTHON-5058`_ for more information.
1415

1516
PyMongo 4.11 brings a number of changes including:
1617

@@ -49,6 +50,7 @@ in this release.
4950
.. _PyMongo 4.11 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=40784
5051
.. _PYTHON-5027: https://jira.mongodb.org/browse/PYTHON-5027
5152
.. _PYTHON-5024: https://jira.mongodb.org/browse/PYTHON-5024
53+
.. _PYTHON-5058: https://jira.mongodb.org/browse/PYTHON-5058
5254

5355
Changes in Version 4.10.1 (2024/10/01)
5456
--------------------------------------

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set dotenv-load
44
set dotenv-filename := "./.evergreen/scripts/env.sh"
55

66
# Commonly used command segments.
7-
uv_run := "uv run --isolated "
7+
uv_run := "uv run --isolated --frozen "
88
typing_run := uv_run + "--group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd"
99
docs_run := uv_run + "--extra docs"
1010
doc_build := "./doc/_build"

pymongo/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060

6161
# Defaults until we connect to a server and get updated limits.
6262
MAX_BSON_SIZE = 16 * (1024**2)
63-
MAX_MESSAGE_SIZE: int = 2 * MAX_BSON_SIZE
63+
MAX_MESSAGE_SIZE = 48 * 1000 * 1000
6464
MIN_WIRE_VERSION = 0
6565
MAX_WIRE_VERSION = 0
66-
MAX_WRITE_BATCH_SIZE = 1000
66+
MAX_WRITE_BATCH_SIZE = 100000
6767

6868
# What this version of PyMongo supports.
6969
MIN_SUPPORTED_SERVER_VERSION = "4.0"

pymongo/hello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def max_bson_size(self) -> int:
133133

134134
@property
135135
def max_message_size(self) -> int:
136-
return self._doc.get("maxMessageSizeBytes", 2 * self.max_bson_size)
136+
return self._doc.get("maxMessageSizeBytes", common.MAX_MESSAGE_SIZE)
137137

138138
@property
139139
def max_write_batch_size(self) -> int:

test/test_server_description.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
from bson.int64 import Int64
2525
from bson.objectid import ObjectId
26+
from pymongo import common
2627
from pymongo.hello import Hello, HelloCompat
2728
from pymongo.server_description import ServerDescription
2829
from pymongo.server_type import SERVER_TYPE
@@ -132,11 +133,13 @@ def test_fields(self):
132133
self.assertEqual(4, s.min_wire_version)
133134
self.assertEqual(25, s.max_wire_version)
134135

135-
def test_default_max_message_size(self):
136-
s = parse_hello_response({"ok": 1, HelloCompat.LEGACY_CMD: True, "maxBsonObjectSize": 2})
137-
138-
# Twice max_bson_size.
139-
self.assertEqual(4, s.max_message_size)
136+
def test_defaults(self):
137+
s = parse_hello_response({"ok": 1, HelloCompat.LEGACY_CMD: True})
138+
self.assertEqual(common.MAX_BSON_SIZE, s.max_bson_size)
139+
self.assertEqual(common.MAX_MESSAGE_SIZE, s.max_message_size)
140+
self.assertEqual(common.MIN_WIRE_VERSION, s.min_wire_version)
141+
self.assertEqual(common.MAX_WIRE_VERSION, s.max_wire_version)
142+
self.assertEqual(common.MAX_WRITE_BATCH_SIZE, s.max_write_batch_size)
140143

141144
def test_standalone(self):
142145
s = parse_hello_response({"ok": 1, HelloCompat.LEGACY_CMD: True})

0 commit comments

Comments
 (0)