diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e61bd2f..e65c160 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -54,7 +54,7 @@ functions: continue_on_err: true command: | cat /etc/resolv.conf - # Create virtualenv using a CPython 3.8+ binary. + # Create virtualenv using a CPython 3.9+ binary. - command: subprocess.exec type: setup params: @@ -757,7 +757,7 @@ axes: run_on: windows-64-vsMulti-small batchtime: 10080 # 7 days variables: - PYTHON3_BINARY: "C:/python/Python38/python.exe" + PYTHON3_BINARY: "C:/python/Python39/python.exe" PYTHON_BIN_DIR: "Scripts" # The 'runtime' axis specifies the language runtime to use. @@ -765,14 +765,14 @@ axes: - id: runtime display_name: runtime values: - - id: python39 + - id: python3-linux display_name: CPython-3 variables: PYTHON_BINARY: "/opt/python/3.9/bin/python3" - - id: python38-windows - display_name: CPython-3.8-Windows + - id: python3-windows + display_name: CPython-3-Windows variables: - PYTHON_BINARY: "C:/python/Python38/python.exe" + PYTHON_BINARY: "C:/python/Python39/python.exe" - id: ruby-32 display_name: Ruby 3.2 variables: @@ -864,7 +864,7 @@ buildvariants: matrix_spec: driver: ["pymongo-master"] platform: ["ubuntu-22.04"] - runtime: ["python39"] + runtime: ["python3-linux"] display_name: "${driver} ${platform} ${runtime}" tasks: - ".all" @@ -872,7 +872,7 @@ buildvariants: matrix_spec: driver: ["pymongo-master"] platform: ["windows-64"] - runtime: ["python38-windows"] + runtime: ["python3-windows"] display_name: "${driver} ${platform} ${runtime}" tasks: # Kind tasks can't run on Windows, so exclude them. diff --git a/README.md b/README.md index 1826086..fa98a0a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ API](https://docs.atlas.mongodb.com/api/) via a fluent interface. The `atlasclient` and also contains the test harnesses necessary to run Atlas Planned Maintenance specification tests. -Astrolabe supports Python 3.8+. +Astrolabe supports Python 3.9+. ## Installation @@ -36,7 +36,7 @@ python -m pip install . ## Dependencies -Astrolabe supports CPython 3.8+. +Astrolabe supports CPython 3.9+. Astrolabe requires [Click](https://pypi.org/project/click/), [requests](https://pypi.org/project/requests/), diff --git a/docs/installing-running-locally.md b/docs/installing-running-locally.md index 8f2b01b..eb82f58 100644 --- a/docs/installing-running-locally.md +++ b/docs/installing-running-locally.md @@ -10,7 +10,7 @@ Kubernetes test scenarios. `astrolabe` runs on Linux, OSX and Windows. -Running `astrolabe` requires Python 3.8 or later. To check the version +Running `astrolabe` requires Python 3.9 or later. To check the version of Python you are running, do: ``` bash diff --git a/docs/integration-guide.md b/docs/integration-guide.md index d1248ff..7f40a1c 100644 --- a/docs/integration-guide.md +++ b/docs/integration-guide.md @@ -153,14 +153,14 @@ systems are **strongly advised** to use the custom distro for running their tests. See `faq-why-custom-distro` for details. The Atlas Planned Maintenance tests can be run on all platforms which -have a Python 3.8+ binary installed. Each entry to the `platform` axis +have a Python 3.9+ binary installed. Each entry to the `platform` axis has the following fields: - `id` (required): unique identifier for this `platform` axis entry. - `display_name` (optional): plaintext name for this platform that will be used to display test runs. - `run_on` (required): evergreen distro name for this platform -- `variables.PYTHON3_BINARY` (required): path to the Python 3.8+ binary +- `variables.PYTHON3_BINARY` (required): path to the Python 3.9+ binary on the distro. This is used to run `astrolabe`. - `variables.PYTHON_BIN_DIR` (required): name of directory in which Python install executables. This is always `bin` on \*nix systems and @@ -172,11 +172,11 @@ platform: - id: platform display_name: OS values: - - id: ubuntu-16.04 - display_name: "Ubuntu 16.04" - run_on: ubuntu1604-test + - id: ubuntu-20.04 + display_name: "Ubuntu 20.04" + run_on: ubuntu2004-test variables: - PYTHON3_BINARY: "/opt/python/3.8/bin/python3" + PYTHON3_BINARY: "/opt/python/3.9/bin/python3" PYTHON_BIN_DIR: "bin" To encourage re-use of `platform` entries across driver projects, it is diff --git a/integrations/python/pymongo/install-driver.sh b/integrations/python/pymongo/install-driver.sh index bdc65ab..c885db8 100755 --- a/integrations/python/pymongo/install-driver.sh +++ b/integrations/python/pymongo/install-driver.sh @@ -3,5 +3,4 @@ set -o xtrace "$PYTHON_BINARY" --version "$PYTHON_BINARY" -m virtualenv "$PYMONGO_VIRTUALENV_NAME" -"$PYMONGO_VIRTUALENV_NAME/$PYTHON_BIN_DIR/pip" install -e mongo-python-driver/[srv] -"$PYMONGO_VIRTUALENV_NAME/$PYTHON_BIN_DIR/pip" install certifi # TODO: remove this once BUILD-10841 is done. +"$PYMONGO_VIRTUALENV_NAME/$PYTHON_BIN_DIR/pip" install -e mongo-python-driver diff --git a/integrations/python/pymongo/workload-executor.py b/integrations/python/pymongo/workload-executor.py index 7fe5f73..e22a16f 100644 --- a/integrations/python/pymongo/workload-executor.py +++ b/integrations/python/pymongo/workload-executor.py @@ -31,6 +31,7 @@ def interrupt_handler(signum, frame): def workload_runner(mongodb_uri, test_workload): runner = UnifiedSpecTestMixinV1() + # Note: we cannot use setUpClass or tearDownClass since we're overriding the client for the tests. runner.TEST_SPEC = test_workload UnifiedSpecTestMixinV1.TEST_SPEC = test_workload runner.setUp() @@ -45,6 +46,8 @@ def workload_runner(mongodb_uri, test_workload): runner.entity_map["errors"] = [ {"error": str(exc), "time": time.time(), "type": type(exc).__name__} ] + finally: + runner.tearDown() entity_map = defaultdict(list, runner.entity_map._entities) for entity_type in ["successes", "iterations"]: if entity_type not in entity_map: diff --git a/pyproject.toml b/pyproject.toml index 7983391..e383f41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version"] description = "Command-line utility for testing Drivers against MongoDB Atlas " readme = "README.rst" license = {file="LICENSE"} -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [ { name = "Prashant Mital", email = "mongodb-user@googlegroups.com" }, ] @@ -23,8 +23,7 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing", ]