Skip to content

Commit e91b817

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 6ce1501 + 4936fe9 commit e91b817

19 files changed

+48
-352
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,6 @@ buildvariants:
7979
TEST_NAME: atlas_connect
8080
tags: [pr]
8181

82-
# Atlas data lake tests
83-
- name: atlas-data-lake-ubuntu-22
84-
tasks:
85-
- name: .test-no-orchestration
86-
display_name: Atlas Data Lake Ubuntu-22
87-
run_on:
88-
- ubuntu2204-small
89-
expansions:
90-
TEST_NAME: data_lake
91-
tags: [pr]
92-
9382
# Aws auth tests
9483
- name: auth-aws-ubuntu-20
9584
tasks:

.evergreen/resync-specs.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ do
7676
auth)
7777
cpjson auth/tests/ auth
7878
;;
79-
atlas-data-lake-testing|data_lake)
80-
cpjson atlas-data-lake-testing/tests/ data_lake
81-
;;
8279
bson-binary-vector|bson_binary_vector)
8380
cpjson bson-binary-vector/tests/ bson_binary_vector
8481
;;

.evergreen/run-tests.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ else
2525
exit 1
2626
fi
2727

28-
# List the packages.
29-
uv sync ${UV_ARGS} --reinstall --quiet
30-
uv pip list
31-
3228
# Start the test runner.
33-
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
29+
uv run ${UV_ARGS} --reinstall .evergreen/scripts/run_tests.py "$@"
3430

3531
popd

.evergreen/scripts/generate_config.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,6 @@ def create_no_c_ext_variants():
322322
return [create_variant(tasks, display_name, host=host)]
323323

324324

325-
def create_atlas_data_lake_variants():
326-
host = HOSTS["ubuntu22"]
327-
tasks = [".test-no-orchestration"]
328-
expansions = dict(TEST_NAME="data_lake")
329-
display_name = get_variant_name("Atlas Data Lake", host)
330-
return [create_variant(tasks, display_name, tags=["pr"], host=host, expansions=expansions)]
331-
332-
333325
def create_mod_wsgi_variants():
334326
host = HOSTS["ubuntu22"]
335327
tasks = [".mod_wsgi"]

.evergreen/scripts/generate_config_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def generate_yaml(tasks=None, variants=None):
273273
out = ShrubService.generate_yaml(project)
274274
# Dedent by two spaces to match what we use in config.yml
275275
lines = [line[2:] for line in out.splitlines()]
276-
print("\n".join(lines)) # noqa: T201
276+
print("\n".join(lines))
277277

278278

279279
##################

.evergreen/scripts/resync-all-specs.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def resync_specs(directory: pathlib.Path, errored: dict[str, str]) -> None:
1313
"""Actually sync the specs"""
14-
print("Beginning to sync specs") # noqa: T201
14+
print("Beginning to sync specs")
1515
for spec in os.scandir(directory):
1616
if not spec.is_dir():
1717
continue
@@ -27,11 +27,11 @@ def resync_specs(directory: pathlib.Path, errored: dict[str, str]) -> None:
2727
)
2828
except CalledProcessError as exc:
2929
errored[spec.name] = exc.stderr
30-
print("Done syncing specs") # noqa: T201
30+
print("Done syncing specs")
3131

3232

3333
def apply_patches():
34-
print("Beginning to apply patches") # noqa: T201
34+
print("Beginning to apply patches")
3535
subprocess.run(["bash", "./.evergreen/remove-unimplemented-tests.sh"], check=True) # noqa: S603, S607
3636
subprocess.run(
3737
["git apply -R --allow-empty --whitespace=fix ./.evergreen/spec-patch/*"], # noqa: S607
@@ -56,7 +56,6 @@ def check_new_spec_directories(directory: pathlib.Path) -> list[str]:
5656
"client_side_operations_timeout": "csot",
5757
"mongodb_handshake": "handshake",
5858
"load_balancers": "load_balancer",
59-
"atlas_data_lake_testing": "atlas",
6059
"connection_monitoring_and_pooling": "connection_monitoring",
6160
"command_logging_and_monitoring": "command_logging",
6261
"initial_dns_seedlist_discovery": "srv_seedlist",
@@ -96,7 +95,7 @@ def write_summary(errored: dict[str, str], new: list[str], filename: Optional[st
9695
pr_body += "\n"
9796
if pr_body != "":
9897
if filename is None:
99-
print(f"\n{pr_body}") # noqa: T201
98+
print(f"\n{pr_body}")
10099
else:
101100
with open(filename, "w") as f:
102101
# replacements made for proper json

.evergreen/scripts/run_tests.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
from pathlib import Path
1111
from shutil import which
1212

13+
try:
14+
import importlib_metadata
15+
except ImportError:
16+
from importlib import metadata as importlib_metadata
17+
18+
1319
import pytest
1420
from utils import DRIVERS_TOOLS, LOGGER, ROOT, run_command
1521

@@ -23,6 +29,21 @@
2329
SUB_TEST_NAME = os.environ.get("SUB_TEST_NAME")
2430

2531

32+
def list_packages():
33+
packages = dict()
34+
for distribution in importlib_metadata.distributions():
35+
packages[distribution.name] = distribution
36+
print("Package Version URL")
37+
print("------------------- ----------- ----------------------------------------------------")
38+
for name in sorted(packages):
39+
distribution = packages[name]
40+
url = ""
41+
if distribution.origin is not None:
42+
url = distribution.origin.url
43+
print(f"{name:20s}{distribution.version:12s}{url}")
44+
print("------------------- ----------- ----------------------------------------------------\n")
45+
46+
2647
def handle_perf(start_time: datetime):
2748
end_time = datetime.now()
2849
elapsed_secs = (end_time - start_time).total_seconds()
@@ -121,6 +142,9 @@ def handle_aws_lambda() -> None:
121142

122143

123144
def run() -> None:
145+
# List the installed packages.
146+
list_packages()
147+
124148
# Handle green framework first so they can patch modules.
125149
if GREEN_FRAMEWORK:
126150
handle_green_framework()

.evergreen/scripts/setup_tests.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,8 @@ def handle_test_env() -> None:
214214
if key in os.environ:
215215
write_env(key, os.environ[key])
216216

217-
if test_name == "data_lake":
218-
# Stop any running mongo-orchestration which might be using the port.
219-
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh")
220-
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/atlas_data_lake/setup.sh")
221-
AUTH = "auth"
222-
223217
if AUTH != "noauth":
224-
if test_name == "data_lake":
225-
config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh")
226-
DB_USER = config["ADL_USERNAME"]
227-
DB_PASSWORD = config["ADL_PASSWORD"]
228-
elif test_name == "auth_oidc":
218+
if test_name == "auth_oidc":
229219
DB_USER = config["OIDC_ADMIN_USER"]
230220
DB_PASSWORD = config["OIDC_ADMIN_PWD"]
231221
elif test_name == "search_index":
@@ -356,7 +346,9 @@ def handle_test_env() -> None:
356346
setup_libmongocrypt()
357347

358348
# TODO: Test with 'pip install pymongocrypt'
359-
UV_ARGS.append("--group pymongocrypt_source")
349+
UV_ARGS.append(
350+
"--with pymongocrypt@git+https://github.com/mongodb/libmongocrypt@master#subdirectory=bindings/python"
351+
)
360352

361353
# Use the nocrypto build to avoid dependency issues with older windows/python versions.
362354
BASE = ROOT / "libmongocrypt/nocrypto"

.evergreen/scripts/teardown_tests.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@
5757

5858
teardown_mod_wsgi()
5959

60-
# Tear down data_lake if applicable.
61-
elif TEST_NAME == "data_lake":
62-
run_command(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/teardown.sh")
63-
6460
# Tear down coverage if applicable.
6561
if os.environ.get("COVERAGE"):
6662
shutil.rmtree(".pytest_cache", ignore_errors=True)

.evergreen/scripts/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class Distro:
3333
"atlas_connect": "atlas_connect",
3434
"auth_aws": "auth_aws",
3535
"auth_oidc": "auth_oidc",
36-
"data_lake": "data_lake",
3736
"default": "",
3837
"default_async": "default_async",
3938
"default_sync": "default",
@@ -57,7 +56,6 @@ class Distro:
5756
"auth_oidc",
5857
"atlas_connect",
5958
"aws_lambda",
60-
"data_lake",
6159
"mockupdb",
6260
"ocsp",
6361
]

0 commit comments

Comments
 (0)