From dba0aa94adfc1ec5581cfb4edd5069b30662f5cc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 17 Sep 2025 08:15:32 -0500 Subject: [PATCH 1/2] PYTHON-5472 Remove driver tests for Atlas Data Lake (#2542) --- .evergreen/generated_configs/variants.yml | 11 --- .evergreen/resync-specs.sh | 3 - .evergreen/scripts/generate_config.py | 8 -- .evergreen/scripts/resync-all-specs.py | 1 - .evergreen/scripts/setup_tests.py | 12 +-- .evergreen/scripts/teardown_tests.py | 4 - .evergreen/scripts/utils.py | 2 - CONTRIBUTING.md | 7 -- pyproject.toml | 1 - test/__init__.py | 34 ------- test/asynchronous/__init__.py | 34 ------- test/asynchronous/test_data_lake.py | 107 ---------------------- test/test_data_lake.py | 107 ---------------------- tools/synchro.py | 1 - 14 files changed, 1 insertion(+), 331 deletions(-) delete mode 100644 test/asynchronous/test_data_lake.py delete mode 100644 test/test_data_lake.py diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 33b8e0ba0..5e769173f 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -79,17 +79,6 @@ buildvariants: TEST_NAME: atlas_connect tags: [pr] - # Atlas data lake tests - - name: atlas-data-lake-ubuntu-22 - tasks: - - name: .test-no-orchestration - display_name: Atlas Data Lake Ubuntu-22 - run_on: - - ubuntu2204-small - expansions: - TEST_NAME: data_lake - tags: [pr] - # Aws auth tests - name: auth-aws-ubuntu-20 tasks: diff --git a/.evergreen/resync-specs.sh b/.evergreen/resync-specs.sh index 765af2a56..d2bd89c78 100755 --- a/.evergreen/resync-specs.sh +++ b/.evergreen/resync-specs.sh @@ -76,9 +76,6 @@ do auth) cpjson auth/tests/ auth ;; - atlas-data-lake-testing|data_lake) - cpjson atlas-data-lake-testing/tests/ data_lake - ;; bson-binary-vector|bson_binary_vector) cpjson bson-binary-vector/tests/ bson_binary_vector ;; diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index f76c0d1e0..a04a64d30 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -322,14 +322,6 @@ def create_no_c_ext_variants(): return [create_variant(tasks, display_name, host=host)] -def create_atlas_data_lake_variants(): - host = HOSTS["ubuntu22"] - tasks = [".test-no-orchestration"] - expansions = dict(TEST_NAME="data_lake") - display_name = get_variant_name("Atlas Data Lake", host) - return [create_variant(tasks, display_name, tags=["pr"], host=host, expansions=expansions)] - - def create_mod_wsgi_variants(): host = HOSTS["ubuntu22"] tasks = [".mod_wsgi"] diff --git a/.evergreen/scripts/resync-all-specs.py b/.evergreen/scripts/resync-all-specs.py index 0817e2fc3..778a38af8 100644 --- a/.evergreen/scripts/resync-all-specs.py +++ b/.evergreen/scripts/resync-all-specs.py @@ -56,7 +56,6 @@ def check_new_spec_directories(directory: pathlib.Path) -> list[str]: "client_side_operations_timeout": "csot", "mongodb_handshake": "handshake", "load_balancers": "load_balancer", - "atlas_data_lake_testing": "atlas", "connection_monitoring_and_pooling": "connection_monitoring", "command_logging_and_monitoring": "command_logging", "initial_dns_seedlist_discovery": "srv_seedlist", diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index 9f383d942..2ddede127 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -214,18 +214,8 @@ def handle_test_env() -> None: if key in os.environ: write_env(key, os.environ[key]) - if test_name == "data_lake": - # Stop any running mongo-orchestration which might be using the port. - run_command(f"bash {DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh") - run_command(f"bash {DRIVERS_TOOLS}/.evergreen/atlas_data_lake/setup.sh") - AUTH = "auth" - if AUTH != "noauth": - if test_name == "data_lake": - config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh") - DB_USER = config["ADL_USERNAME"] - DB_PASSWORD = config["ADL_PASSWORD"] - elif test_name == "auth_oidc": + if test_name == "auth_oidc": DB_USER = config["OIDC_ADMIN_USER"] DB_PASSWORD = config["OIDC_ADMIN_PWD"] elif test_name == "search_index": diff --git a/.evergreen/scripts/teardown_tests.py b/.evergreen/scripts/teardown_tests.py index d89f513f1..7da0b6081 100644 --- a/.evergreen/scripts/teardown_tests.py +++ b/.evergreen/scripts/teardown_tests.py @@ -57,10 +57,6 @@ elif TEST_NAME == "mod_wsgi": teardown_mod_wsgi() -# Tear down data_lake if applicable. -elif TEST_NAME == "data_lake": - run_command(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/teardown.sh") - # Tear down coverage if applicable. if os.environ.get("COVERAGE"): shutil.rmtree(".pytest_cache", ignore_errors=True) diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index 323ec2c56..8d1b466b6 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -33,7 +33,6 @@ TEST_SUITE_MAP = { "atlas_connect": "atlas_connect", "auth_aws": "auth_aws", "auth_oidc": "auth_oidc", - "data_lake": "data_lake", "default": "", "default_async": "default_async", "default_sync": "default", @@ -57,7 +56,6 @@ NO_RUN_ORCHESTRATION = [ "auth_oidc", "atlas_connect", "aws_lambda", - "data_lake", "mockupdb", "ocsp", ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed5272776..16907d428 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -355,13 +355,6 @@ Note: these tests can only be run from an Evergreen Linux host that has the Pyth The `mode` can be `standalone` or `embedded`. For the `replica_set` version of the tests, use `TOPOLOGY=replica_set just run-server`. -### Atlas Data Lake tests. - -You must have `docker` or `podman` installed locally. - -- Run `just setup-tests data_lake`. -- Run `just run-tests`. - ### OCSP tests - Export the orchestration file, e.g. `export ORCHESTRATION_FILE=rsa-basic-tls-ocsp-disableStapling.json`. diff --git a/pyproject.toml b/pyproject.toml index fe277d8ed..ad256a6c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,6 @@ markers = [ "auth: tests that rely on authentication", "ocsp: tests that rely on ocsp", "atlas_connect: tests that rely on an atlas connection", - "data_lake: tests that rely on atlas data lake", "perf: benchmark tests", "search_index: search index helper tests", "kms: client-side field-level encryption tests using kms", diff --git a/test/__init__.py b/test/__init__.py index d583a72f0..bef672b5f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -121,7 +121,6 @@ class ClientContext: self.sessions_enabled = False self.client = None # type: ignore self.conn_lock = threading.Lock() - self.is_data_lake = False self.load_balancer = TEST_LOADBALANCER self._fips_enabled = None if self.load_balancer: @@ -199,16 +198,6 @@ class ClientContext: self.mongoses = [] self.connection_attempts = [] self.client = self._connect(host, port) - if self.client is not None: - # Return early when connected to dataLake as mongohoused does not - # support the getCmdLineOpts command and is tested without TLS. - if os.environ.get("TEST_DATA_LAKE"): - self.is_data_lake = True - self.auth_enabled = True - self.client.close() - self.client = self._connect(host, port, username=db_user, password=db_pwd) - self.connected = True - return if HAVE_SSL and not self.client: # Is MongoDB configured for SSL? @@ -501,14 +490,6 @@ class ClientContext: func=func, ) - def require_data_lake(self, func): - """Run a test only if we are connected to Atlas Data Lake.""" - return self._require( - lambda: self.is_data_lake, - "Not connected to Atlas Data Lake on self.pair", - func=func, - ) - def require_version_min(self, *ver): """Run a test only if the server version is at least ``version``.""" other_version = Version(*ver) @@ -1230,21 +1211,6 @@ def teardown(): garbage.append(f" gc.get_referrers: {gc.get_referrers(g)!r}") if garbage: raise AssertionError("\n".join(garbage)) - c = client_context.client - if c: - if not client_context.is_data_lake: - try: - c.drop_database("pymongo-pooling-tests") - c.drop_database("pymongo_test") - c.drop_database("pymongo_test1") - c.drop_database("pymongo_test2") - c.drop_database("pymongo_test_mike") - c.drop_database("pymongo_test_bernie") - except AutoReconnect: - # PYTHON-4982 - if sys.implementation.name.lower() != "pypy": - raise - c.close() print_running_clients() diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index 8ab7ff721..5a6531180 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -121,7 +121,6 @@ class AsyncClientContext: self.sessions_enabled = False self.client = None # type: ignore self.conn_lock = threading.Lock() - self.is_data_lake = False self.load_balancer = TEST_LOADBALANCER self._fips_enabled = None if self.load_balancer: @@ -199,16 +198,6 @@ class AsyncClientContext: self.mongoses = [] self.connection_attempts = [] self.client = await self._connect(host, port) - if self.client is not None: - # Return early when connected to dataLake as mongohoused does not - # support the getCmdLineOpts command and is tested without TLS. - if os.environ.get("TEST_DATA_LAKE"): - self.is_data_lake = True - self.auth_enabled = True - await self.client.close() - self.client = await self._connect(host, port, username=db_user, password=db_pwd) - self.connected = True - return if HAVE_SSL and not self.client: # Is MongoDB configured for SSL? @@ -501,14 +490,6 @@ class AsyncClientContext: func=func, ) - def require_data_lake(self, func): - """Run a test only if we are connected to Atlas Data Lake.""" - return self._require( - lambda: self.is_data_lake, - "Not connected to Atlas Data Lake on self.pair", - func=func, - ) - def require_version_min(self, *ver): """Run a test only if the server version is at least ``version``.""" other_version = Version(*ver) @@ -1246,21 +1227,6 @@ async def async_teardown(): garbage.append(f" gc.get_referrers: {gc.get_referrers(g)!r}") if garbage: raise AssertionError("\n".join(garbage)) - c = async_client_context.client - if c: - if not async_client_context.is_data_lake: - try: - await c.drop_database("pymongo-pooling-tests") - await c.drop_database("pymongo_test") - await c.drop_database("pymongo_test1") - await c.drop_database("pymongo_test2") - await c.drop_database("pymongo_test_mike") - await c.drop_database("pymongo_test_bernie") - except AutoReconnect: - # PYTHON-4982 - if sys.implementation.name.lower() != "pypy": - raise - await c.close() print_running_clients() diff --git a/test/asynchronous/test_data_lake.py b/test/asynchronous/test_data_lake.py deleted file mode 100644 index 689bf3853..000000000 --- a/test/asynchronous/test_data_lake.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2020-present MongoDB, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Test Atlas Data Lake.""" -from __future__ import annotations - -import os -import sys -from pathlib import Path - -import pytest - -sys.path[0:0] = [""] - -from test.asynchronous import AsyncIntegrationTest, AsyncUnitTest, async_client_context, unittest -from test.asynchronous.unified_format import generate_test_classes -from test.utils_shared import ( - OvertCommandListener, -) - -from pymongo.asynchronous.helpers import anext - -_IS_SYNC = False - -pytestmark = pytest.mark.data_lake - - -class TestDataLakeMustConnect(AsyncUnitTest): - async def test_connected_to_data_lake(self): - self.assertTrue( - async_client_context.is_data_lake and async_client_context.connected, - "client context must be connected to data lake when DATA_LAKE is set. Failed attempts:\n{}".format( - async_client_context.connection_attempt_info() - ), - ) - - -class TestDataLakeProse(AsyncIntegrationTest): - # Default test database and collection names. - TEST_DB = "test" - TEST_COLLECTION = "driverdata" - - @async_client_context.require_data_lake - async def asyncSetUp(self): - await super().asyncSetUp() - - # Test killCursors - async def test_1(self): - listener = OvertCommandListener() - client = await self.async_rs_or_single_client(event_listeners=[listener]) - cursor = client[self.TEST_DB][self.TEST_COLLECTION].find({}, batch_size=2) - await anext(cursor) - - # find command assertions - find_cmd = listener.succeeded_events[-1] - self.assertEqual(find_cmd.command_name, "find") - cursor_id = find_cmd.reply["cursor"]["id"] - cursor_ns = find_cmd.reply["cursor"]["ns"] - - # killCursors command assertions - await cursor.close() - started = listener.started_events[-1] - self.assertEqual(started.command_name, "killCursors") - succeeded = listener.succeeded_events[-1] - self.assertEqual(succeeded.command_name, "killCursors") - - self.assertIn(cursor_id, started.command["cursors"]) - target_ns = ".".join([started.command["$db"], started.command["killCursors"]]) - self.assertEqual(cursor_ns, target_ns) - - self.assertIn(cursor_id, succeeded.reply["cursorsKilled"]) - - # Test no auth - async def test_2(self): - client = await self.async_rs_client_noauth() - await client.admin.command("ping") - - # Test with auth - async def test_3(self): - for mechanism in ["SCRAM-SHA-1", "SCRAM-SHA-256"]: - client = await self.async_rs_or_single_client(authMechanism=mechanism) - await client[self.TEST_DB][self.TEST_COLLECTION].find_one() - - -# Location of JSON test specifications. -if _IS_SYNC: - TEST_PATH = Path(__file__).parent / "data_lake/unified" -else: - TEST_PATH = Path(__file__).parent.parent / "data_lake/unified" - -# Generate unified tests. -globals().update(generate_test_classes(TEST_PATH, module=__name__)) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/test_data_lake.py b/test/test_data_lake.py deleted file mode 100644 index d6d200700..000000000 --- a/test/test_data_lake.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2020-present MongoDB, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Test Atlas Data Lake.""" -from __future__ import annotations - -import os -import sys -from pathlib import Path - -import pytest - -sys.path[0:0] = [""] - -from test import IntegrationTest, UnitTest, client_context, unittest -from test.unified_format import generate_test_classes -from test.utils_shared import ( - OvertCommandListener, -) - -from pymongo.synchronous.helpers import next - -_IS_SYNC = True - -pytestmark = pytest.mark.data_lake - - -class TestDataLakeMustConnect(UnitTest): - def test_connected_to_data_lake(self): - self.assertTrue( - client_context.is_data_lake and client_context.connected, - "client context must be connected to data lake when DATA_LAKE is set. Failed attempts:\n{}".format( - client_context.connection_attempt_info() - ), - ) - - -class TestDataLakeProse(IntegrationTest): - # Default test database and collection names. - TEST_DB = "test" - TEST_COLLECTION = "driverdata" - - @client_context.require_data_lake - def setUp(self): - super().setUp() - - # Test killCursors - def test_1(self): - listener = OvertCommandListener() - client = self.rs_or_single_client(event_listeners=[listener]) - cursor = client[self.TEST_DB][self.TEST_COLLECTION].find({}, batch_size=2) - next(cursor) - - # find command assertions - find_cmd = listener.succeeded_events[-1] - self.assertEqual(find_cmd.command_name, "find") - cursor_id = find_cmd.reply["cursor"]["id"] - cursor_ns = find_cmd.reply["cursor"]["ns"] - - # killCursors command assertions - cursor.close() - started = listener.started_events[-1] - self.assertEqual(started.command_name, "killCursors") - succeeded = listener.succeeded_events[-1] - self.assertEqual(succeeded.command_name, "killCursors") - - self.assertIn(cursor_id, started.command["cursors"]) - target_ns = ".".join([started.command["$db"], started.command["killCursors"]]) - self.assertEqual(cursor_ns, target_ns) - - self.assertIn(cursor_id, succeeded.reply["cursorsKilled"]) - - # Test no auth - def test_2(self): - client = self.rs_client_noauth() - client.admin.command("ping") - - # Test with auth - def test_3(self): - for mechanism in ["SCRAM-SHA-1", "SCRAM-SHA-256"]: - client = self.rs_or_single_client(authMechanism=mechanism) - client[self.TEST_DB][self.TEST_COLLECTION].find_one() - - -# Location of JSON test specifications. -if _IS_SYNC: - TEST_PATH = Path(__file__).parent / "data_lake/unified" -else: - TEST_PATH = Path(__file__).parent.parent / "data_lake/unified" - -# Generate unified tests. -globals().update(generate_test_classes(TEST_PATH, module=__name__)) - - -if __name__ == "__main__": - unittest.main() diff --git a/tools/synchro.py b/tools/synchro.py index e502f9628..a4190529c 100644 --- a/tools/synchro.py +++ b/tools/synchro.py @@ -230,7 +230,6 @@ converted_tests = [ "test_cursor.py", "test_custom_types.py", "test_database.py", - "test_data_lake.py", "test_discovery_and_monitoring.py", "test_dns.py", "test_encryption.py", From 4936fe90bfdc0e43e9bd6376b2622773e98b823e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 17 Sep 2025 13:05:52 -0500 Subject: [PATCH 2/2] PYTHON-5539 Fix installation of pymongocrypt from source (#2541) --- .evergreen/run-tests.sh | 6 +----- .evergreen/scripts/generate_config_utils.py | 2 +- .evergreen/scripts/resync-all-specs.py | 8 +++---- .evergreen/scripts/run_tests.py | 24 +++++++++++++++++++++ .evergreen/scripts/setup_tests.py | 4 +++- pyproject.toml | 4 +--- requirements/test.txt | 1 + uv.lock | 19 ++++++++++------ 8 files changed, 47 insertions(+), 21 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index a9f2ba2b5..ec3746b29 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -25,11 +25,7 @@ else exit 1 fi -# List the packages. -uv sync ${UV_ARGS} --reinstall --quiet -uv pip list - # Start the test runner. -uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@" +uv run ${UV_ARGS} --reinstall .evergreen/scripts/run_tests.py "$@" popd diff --git a/.evergreen/scripts/generate_config_utils.py b/.evergreen/scripts/generate_config_utils.py index 632d34ea6..26fe753e8 100644 --- a/.evergreen/scripts/generate_config_utils.py +++ b/.evergreen/scripts/generate_config_utils.py @@ -273,7 +273,7 @@ def generate_yaml(tasks=None, variants=None): out = ShrubService.generate_yaml(project) # Dedent by two spaces to match what we use in config.yml lines = [line[2:] for line in out.splitlines()] - print("\n".join(lines)) # noqa: T201 + print("\n".join(lines)) ################## diff --git a/.evergreen/scripts/resync-all-specs.py b/.evergreen/scripts/resync-all-specs.py index 778a38af8..dc0254582 100644 --- a/.evergreen/scripts/resync-all-specs.py +++ b/.evergreen/scripts/resync-all-specs.py @@ -11,7 +11,7 @@ from typing import Optional def resync_specs(directory: pathlib.Path, errored: dict[str, str]) -> None: """Actually sync the specs""" - print("Beginning to sync specs") # noqa: T201 + print("Beginning to sync specs") for spec in os.scandir(directory): if not spec.is_dir(): continue @@ -27,11 +27,11 @@ def resync_specs(directory: pathlib.Path, errored: dict[str, str]) -> None: ) except CalledProcessError as exc: errored[spec.name] = exc.stderr - print("Done syncing specs") # noqa: T201 + print("Done syncing specs") def apply_patches(): - print("Beginning to apply patches") # noqa: T201 + print("Beginning to apply patches") subprocess.run(["bash", "./.evergreen/remove-unimplemented-tests.sh"], check=True) # noqa: S603, S607 subprocess.run( ["git apply -R --allow-empty --whitespace=fix ./.evergreen/spec-patch/*"], # noqa: S607 @@ -95,7 +95,7 @@ def write_summary(errored: dict[str, str], new: list[str], filename: Optional[st pr_body += "\n" if pr_body != "": if filename is None: - print(f"\n{pr_body}") # noqa: T201 + print(f"\n{pr_body}") else: with open(filename, "w") as f: # replacements made for proper json diff --git a/.evergreen/scripts/run_tests.py b/.evergreen/scripts/run_tests.py index 5c1ba25a9..3a1c15a41 100644 --- a/.evergreen/scripts/run_tests.py +++ b/.evergreen/scripts/run_tests.py @@ -10,6 +10,12 @@ from datetime import datetime from pathlib import Path from shutil import which +try: + import importlib_metadata +except ImportError: + from importlib import metadata as importlib_metadata + + import pytest from utils import DRIVERS_TOOLS, LOGGER, ROOT, run_command @@ -23,6 +29,21 @@ TEST_NAME = os.environ.get("TEST_NAME") SUB_TEST_NAME = os.environ.get("SUB_TEST_NAME") +def list_packages(): + packages = dict() + for distribution in importlib_metadata.distributions(): + packages[distribution.name] = distribution + print("Package Version URL") + print("------------------- ----------- ----------------------------------------------------") + for name in sorted(packages): + distribution = packages[name] + url = "" + if distribution.origin is not None: + url = distribution.origin.url + print(f"{name:20s}{distribution.version:12s}{url}") + print("------------------- ----------- ----------------------------------------------------\n") + + def handle_perf(start_time: datetime): end_time = datetime.now() elapsed_secs = (end_time - start_time).total_seconds() @@ -121,6 +142,9 @@ def handle_aws_lambda() -> None: def run() -> None: + # List the installed packages. + list_packages() + # Handle green framework first so they can patch modules. if GREEN_FRAMEWORK: handle_green_framework() diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index 2ddede127..02b8fae45 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -346,7 +346,9 @@ def handle_test_env() -> None: setup_libmongocrypt() # TODO: Test with 'pip install pymongocrypt' - UV_ARGS.append("--group pymongocrypt_source") + UV_ARGS.append( + "--with pymongocrypt@git+https://github.com/mongodb/libmongocrypt@master#subdirectory=bindings/python" + ) # Use the nocrypto build to avoid dependency issues with older windows/python versions. BASE = ROOT / "libmongocrypt/nocrypto" diff --git a/pyproject.toml b/pyproject.toml index ad256a6c6..53fbfc8c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,9 +60,6 @@ coverage = [ mockupdb = [ "mockupdb@git+https://github.com/mongodb-labs/mongo-mockup-db@master" ] -pymongocrypt_source = [ - "pymongocrypt@git+https://github.com/mongodb/libmongocrypt@master#subdirectory=bindings/python" -] perf = ["simplejson"] typing = [ "mypy==1.18.1", @@ -238,6 +235,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?)|dummy.*)$" [tool.ruff.lint.per-file-ignores] "pymongo/__init__.py" = ["E402"] +".evergreen/scripts/*.py" = ["T201"] "test/*.py" = ["PT", "E402", "PLW", "SIM", "E741", "PTH", "S", "B904", "E722", "T201", "RET", "ARG", "F405", "B028", "PGH001", "B018", "F403", "RUF015", "E731", "B007", "UP031", "F401", "B023", "F811"] diff --git a/requirements/test.txt b/requirements/test.txt index 135114fef..566cade7e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,2 +1,3 @@ pytest>=8.2 pytest-asyncio>=0.24.0 +importlib_metadata>=7.0;python_version < "3.13" diff --git a/uv.lock b/uv.lock index ff7bd6fe2..ce0367e87 100644 --- a/uv.lock +++ b/uv.lock @@ -932,7 +932,7 @@ name = "importlib-metadata" version = "8.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "zipp", marker = "python_full_version < '3.10'" }, + { name = "zipp", marker = "python_full_version != '3.14.*'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000", size = 56641, upload-time = "2025-04-27T15:29:01.736Z" } wheels = [ @@ -1261,6 +1261,7 @@ snappy = [ { name = "python-snappy" }, ] test = [ + { name = "importlib-metadata", marker = "python_full_version < '3.13'" }, { name = "pytest" }, { name = "pytest-asyncio" }, ] @@ -1292,9 +1293,6 @@ perf = [ pip = [ { name = "pip" }, ] -pymongocrypt-source = [ - { name = "pymongocrypt" }, -] typing = [ { name = "mypy" }, { name = "pip" }, @@ -1309,6 +1307,7 @@ requires-dist = [ { name = "cryptography", marker = "extra == 'ocsp'", specifier = ">=2.5" }, { name = "dnspython", specifier = ">=1.16.0,<3.0.0" }, { name = "furo", marker = "extra == 'docs'", specifier = "==2025.7.19" }, + { name = "importlib-metadata", marker = "python_full_version < '3.13' and extra == 'test'", specifier = ">=7.0" }, { name = "pykerberos", marker = "os_name != 'nt' and extra == 'gssapi'" }, { name = "pymongo-auth-aws", marker = "extra == 'aws'", specifier = ">=1.1.0,<2.0.0" }, { name = "pymongo-auth-aws", marker = "extra == 'encryption'", specifier = ">=1.1.0,<2.0.0" }, @@ -1343,7 +1342,6 @@ gevent = [ mockupdb = [{ name = "mockupdb", git = "https://github.com/mongodb-labs/mongo-mockup-db?rev=master" }] perf = [{ name = "simplejson" }] pip = [{ name = "pip" }] -pymongocrypt-source = [{ name = "pymongocrypt", git = "https://github.com/mongodb/libmongocrypt?subdirectory=bindings%2Fpython&rev=master" }] typing = [ { name = "mypy", specifier = "==1.18.1" }, { name = "pip" }, @@ -1366,8 +1364,8 @@ wheels = [ [[package]] name = "pymongocrypt" -version = "1.17.0.dev0" -source = { git = "https://github.com/mongodb/libmongocrypt?subdirectory=bindings%2Fpython&rev=master#36a6beafc99efdbe990ece675573ef581d151c92" } +version = "1.16.0" +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi", version = "1.17.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version != '3.14.*'" }, { name = "cffi", version = "2.0.0b1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.14.*'" }, @@ -1375,6 +1373,13 @@ dependencies = [ { name = "httpx" }, { name = "packaging" }, ] +sdist = { url = "https://files.pythonhosted.org/packages/fb/8e/dd9ed710e8fd4eec127dac1db3b3e9156ffcf340a0463a82087a12ae924e/pymongocrypt-1.16.0.tar.gz", hash = "sha256:0db0812055d00e6f5562a8d66711c4cba4b75014c363306c9b298a9fd68fccdd", size = 65354, upload-time = "2025-09-09T18:54:25.531Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fb/8b/dda0f19ce16f7b257e4aa2a8831a1a1307c1ea124a00f571cda83a04adcb/pymongocrypt-1.16.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:fbd85534880ea8525956b96e583a7021c721abbf3b51a6dbe48a57d7eba8e74a", size = 4721169, upload-time = "2025-09-09T18:54:18.642Z" }, + { url = "https://files.pythonhosted.org/packages/99/48/512a5b597d71407f9b06a14cd8e5ac376e06b780d4d54a4e69726bd48703/pymongocrypt-1.16.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:85df0a78480e91bdd3a5a6da3e4cdc7d9700de8a871aa8168588981c041f1914", size = 4038242, upload-time = "2025-09-09T18:54:20.496Z" }, + { url = "https://files.pythonhosted.org/packages/3f/67/3bdeda347191d6c1ee257eb3da8c85f1278d86dfb493cc9bc26352a41d0a/pymongocrypt-1.16.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8d2ebeb1b5e4f4554bf44f726e8009c59c4d7d0b412beebfece875991714676", size = 3775742, upload-time = "2025-09-09T18:54:22.254Z" }, + { url = "https://files.pythonhosted.org/packages/dc/81/70f6947afbd1ac7be54482b44cb1b99e8e9b9cac41985e6250c4fc279e58/pymongocrypt-1.16.0-py3-none-win_amd64.whl", hash = "sha256:c20afcd89ec5fc53305e924c05c4a0321ddc73f1e4e7c8240ee2fd0123e23609", size = 1607917, upload-time = "2025-09-09T18:54:24.182Z" }, +] [[package]] name = "pyopenssl"