Skip to content

Commit 222877c

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents efd833b + 6656767 commit 222877c

File tree

7 files changed

+30
-22
lines changed

7 files changed

+30
-22
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,15 @@ buildvariants:
332332
# Green framework tests
333333
- name: green-eventlet-rhel8
334334
tasks:
335-
- name: .test-standard .standalone-noauth-nossl .python-3.9 .sync
335+
- name: .test-standard .python-3.9 .sync
336336
display_name: Green Eventlet RHEL8
337337
run_on:
338338
- rhel87-small
339339
expansions:
340340
GREEN_FRAMEWORK: eventlet
341341
- name: green-gevent-rhel8
342342
tasks:
343-
- name: .test-standard .standalone-noauth-nossl .sync
343+
- name: .test-standard .sync
344344
display_name: Green Gevent RHEL8
345345
run_on:
346346
- rhel87-small

.evergreen/run-tests.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ else
2626
fi
2727

2828
# List the packages.
29-
uv sync ${UV_ARGS} --reinstall
29+
uv sync ${UV_ARGS} --reinstall --quiet
3030
uv pip list
3131

32-
# Ensure we go back to base environment after the test.
33-
trap "uv sync" EXIT HUP
34-
3532
# Start the test runner.
3633
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
3734

.evergreen/scripts/generate_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ def create_green_framework_variants():
301301
variants = []
302302
host = DEFAULT_HOST
303303
for framework in ["eventlet", "gevent"]:
304-
tasks = [".test-standard .standalone-noauth-nossl .sync"]
304+
tasks = [".test-standard .sync"]
305305
if framework == "eventlet":
306306
# Eventlet has issues with dnspython > 2.0 and newer versions of CPython
307307
# https://jira.mongodb.org/browse/PYTHON-5284
308-
tasks = [".test-standard .standalone-noauth-nossl .python-3.9 .sync"]
308+
tasks = [".test-standard .python-3.9 .sync"]
309309
expansions = dict(GREEN_FRAMEWORK=framework)
310310
display_name = get_variant_name(f"Green {framework.capitalize()}", host)
311311
variant = create_variant(tasks, display_name, host=host, expansions=expansions)

.github/workflows/dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- [ubuntu-latest, "manylinux_i686", "cp3*-manylinux_i686"]
4242
- [windows-2022, "win_amd6", "cp3*-win_amd64"]
4343
- [windows-2022, "win32", "cp3*-win32"]
44+
- [windows-11-arm, "win_arm64", "cp3*-win_arm64"]
4445
- [macos-14, "macos", "cp*-macosx_*"]
4546

4647
steps:
@@ -54,7 +55,7 @@ jobs:
5455
- uses: actions/setup-python@v5
5556
with:
5657
cache: 'pip'
57-
python-version: 3.9
58+
python-version: 3.11
5859
cache-dependency-path: 'pyproject.toml'
5960
allow-prereleases: true
6061

justfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set shell := ["bash", "-c"]
33

44
# Commonly used command segments.
5-
uv_run := "uv run --isolated --frozen "
5+
uv_run := "uv run --frozen "
66
typing_run := uv_run + "--group typing --extra aws --extra encryption --extra ocsp --extra snappy --extra test --extra zstd"
77
docs_run := uv_run + "--extra docs"
88
doc_build := "./doc/_build"
@@ -13,51 +13,55 @@ mypy_args := "--install-types --non-interactive"
1313
default:
1414
@just --list
1515

16+
[private]
17+
resync:
18+
@uv sync --quiet --frozen
19+
1620
install:
1721
bash .evergreen/scripts/setup-dev-env.sh
1822

1923
[group('docs')]
20-
docs:
24+
docs: && resync
2125
{{docs_run}} sphinx-build -W -b html doc {{doc_build}}/html
2226

2327
[group('docs')]
24-
docs-serve:
28+
docs-serve: && resync
2529
{{docs_run}} sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs {{doc_build}}/serve
2630

2731
[group('docs')]
28-
docs-linkcheck:
32+
docs-linkcheck: && resync
2933
{{docs_run}} sphinx-build -E -b linkcheck doc {{doc_build}}/linkcheck
3034

3135
[group('typing')]
32-
typing:
36+
typing: && resync
3337
just typing-mypy
3438
just typing-pyright
3539

3640
[group('typing')]
37-
typing-mypy:
41+
typing-mypy: && resync
3842
{{typing_run}} mypy {{mypy_args}} bson gridfs tools pymongo
3943
{{typing_run}} mypy {{mypy_args}} --config-file mypy_test.ini test
4044
{{typing_run}} mypy {{mypy_args}} test/test_typing.py test/test_typing_strict.py
4145

4246
[group('typing')]
43-
typing-pyright:
47+
typing-pyright: && resync
4448
{{typing_run}} pyright test/test_typing.py test/test_typing_strict.py
4549
{{typing_run}} pyright -p strict_pyrightconfig.json test/test_typing_strict.py
4650

4751
[group('lint')]
48-
lint:
52+
lint: && resync
4953
{{uv_run}} pre-commit run --all-files
5054

5155
[group('lint')]
52-
lint-manual:
56+
lint-manual: && resync
5357
{{uv_run}} pre-commit run --all-files --hook-stage manual
5458

5559
[group('test')]
56-
test *args="-v --durations=5 --maxfail=10":
60+
test *args="-v --durations=5 --maxfail=10": && resync
5761
{{uv_run}} --extra test pytest {{args}}
5862

5963
[group('test')]
60-
run-tests *args:
64+
run-tests *args: && resync
6165
bash ./.evergreen/run-tests.sh {{args}}
6266

6367
[group('test')]

test/asynchronous/test_monitor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from test.asynchronous.utils import (
2929
async_wait_until,
3030
)
31-
from test.utils_shared import ServerAndTopologyEventListener
31+
from test.utils_shared import ServerAndTopologyEventListener, gevent_monkey_patched
3232

3333
from pymongo.periodic_executor import _EXECUTORS
3434

@@ -58,6 +58,9 @@ async def create_client(self):
5858
return client
5959

6060
@unittest.skipIf("PyPy" in sys.version, "PYTHON-5283 fails often on PyPy")
61+
@unittest.skipIf(
62+
gevent_monkey_patched(), "PYTHON-5516 Resources are not cleared when using gevent"
63+
)
6164
async def test_cleanup_executors_on_client_del(self):
6265
with warnings.catch_warnings(record=True) as w:
6366
warnings.simplefilter("always")

test/test_monitor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from test.utils import (
2929
wait_until,
3030
)
31-
from test.utils_shared import ServerAndTopologyEventListener
31+
from test.utils_shared import ServerAndTopologyEventListener, gevent_monkey_patched
3232

3333
from pymongo.periodic_executor import _EXECUTORS
3434

@@ -58,6 +58,9 @@ def create_client(self):
5858
return client
5959

6060
@unittest.skipIf("PyPy" in sys.version, "PYTHON-5283 fails often on PyPy")
61+
@unittest.skipIf(
62+
gevent_monkey_patched(), "PYTHON-5516 Resources are not cleared when using gevent"
63+
)
6164
def test_cleanup_executors_on_client_del(self):
6265
with warnings.catch_warnings(record=True) as w:
6366
warnings.simplefilter("always")

0 commit comments

Comments
 (0)