From 68127d5efd3580ad718a437eff91230c0f70e20e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:49:40 -0500 Subject: [PATCH 01/11] Bump the actions group with 2 updates (#1897) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql.yml | 2 +- .github/workflows/test-python.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 370b8759e..2dc070d7c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 921168c13..3ecdfa52f 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -72,7 +72,7 @@ jobs: pip install hatch fi - name: Start MongoDB - uses: supercharge/mongodb-github-action@1.10.0 + uses: supercharge/mongodb-github-action@1.11.0 with: mongodb-version: 6.0 - name: Run tests @@ -94,7 +94,7 @@ jobs: run: | pip install -U hatch pip - name: Start MongoDB - uses: supercharge/mongodb-github-action@1.10.0 + uses: supercharge/mongodb-github-action@1.11.0 with: mongodb-version: '8.0.0-rc4' - name: Run tests @@ -201,7 +201,7 @@ jobs: # Test sdist on lowest supported Python python-version: '3.8' - name: Start MongoDB - uses: supercharge/mongodb-github-action@1.10.0 + uses: supercharge/mongodb-github-action@1.11.0 - name: Run connect test from sdist shell: bash run: | From def3c11787530290c073080eaceb3682d578b73d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:50:49 -0500 Subject: [PATCH 02/11] Bump furo from 2023.9.10 to 2024.8.6 (#1898) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index 16b274686..d3f0c7303 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -3,4 +3,4 @@ sphinx_rtd_theme>=2,<3 readthedocs-sphinx-search~=0.3 sphinxcontrib-shellcheck>=1,<2 sphinx-autobuild>=2020.9.1 -furo==2023.9.10 +furo==2024.8.6 From 093d5bebde9c4a12ca05edd0c41c350dba472f67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:51:09 -0500 Subject: [PATCH 03/11] Bump pyright from 1.1.382.post1 to 1.1.383 (#1899) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/typing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/typing.txt b/requirements/typing.txt index 1669e6bbc..06c33c6db 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ mypy==1.11.2 -pyright==1.1.382.post1 +pyright==1.1.383 typing_extensions -r ./encryption.txt -r ./ocsp.txt From c48dc692824a4d10a939f3477cb1c0dceb4d5dcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:52:14 -0500 Subject: [PATCH 04/11] Update sphinx requirement from <8,>=5.3 to >=5.3,<9 (#1901) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index d3f0c7303..34723e6ea 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,4 +1,4 @@ -sphinx>=5.3,<8 +sphinx>=5.3,<9 sphinx_rtd_theme>=2,<3 readthedocs-sphinx-search~=0.3 sphinxcontrib-shellcheck>=1,<2 From 006a9960f07c06bad9c5803ddbf8dc1750743d6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 04:55:07 -0500 Subject: [PATCH 05/11] Update sphinx-rtd-theme requirement from <3,>=2 to >=2,<4 (#1900) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index 34723e6ea..7d52c1cb3 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,5 +1,5 @@ sphinx>=5.3,<9 -sphinx_rtd_theme>=2,<3 +sphinx_rtd_theme>=2,<4 readthedocs-sphinx-search~=0.3 sphinxcontrib-shellcheck>=1,<2 sphinx-autobuild>=2020.9.1 From 5a66e992542f635175f58a43e37607a6cf6c4717 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Tue, 8 Oct 2024 14:52:14 -0400 Subject: [PATCH 06/11] PYTHON-4828 - Drop Python 3.8 support (#1902) --- .evergreen/config.yml | 44 ++++++++++++------------------- .evergreen/utils.sh | 32 +++++++++++----------- .github/workflows/dist.yml | 7 +++-- .github/workflows/test-python.yml | 16 +++++------ CONTRIBUTING.md | 2 +- README.md | 2 +- doc/changelog.rst | 5 ++++ doc/faq.rst | 2 +- doc/installation.rst | 4 +-- doc/python3.rst | 2 +- pyproject.toml | 3 +-- test/asynchronous/conftest.py | 2 -- test/conftest.py | 2 -- 13 files changed, 56 insertions(+), 67 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 14e3426b3..7fb48c805 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2233,10 +2233,6 @@ axes: values: # Note: always display platform with python-version to avoid ambiguous display names. # Linux - - id: "3.8" - display_name: "Python 3.8" - variables: - PYTHON_BINARY: "/opt/python/3.8/bin/python3" - id: "3.9" display_name: "Python 3.9" variables: @@ -2269,10 +2265,6 @@ axes: - id: python-version-windows display_name: "Python" values: - - id: "3.8" - display_name: "Python 3.8" - variables: - PYTHON_BINARY: "C:/python/Python38/python.exe" - id: "3.9" display_name: "Python 3.9" variables: @@ -2297,10 +2289,8 @@ axes: - id: python-version-windows-32 display_name: "Python" values: - - id: "3.8" - display_name: "32-bit Python 3.8" - variables: - PYTHON_BINARY: "C:/python/32/Python38/python.exe" + + - id: "3.9" display_name: "32-bit Python 3.9" variables: @@ -2581,10 +2571,10 @@ buildvariants: auth: "*" ssl: "ssl" pyopenssl: "*" - # Only test "noauth" with Python 3.8. + # Only test "noauth" with Python 3.9. exclude_spec: platform: rhel8 - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"] + python-version: ["3.10", "3.11", "3.12", "3.13", "pypy3.9", "pypy3.10"] auth: "noauth" ssl: "ssl" pyopenssl: "*" @@ -2716,7 +2706,7 @@ buildvariants: matrix_spec: platform: rhel7 # Python 3.10+ requires OpenSSL 1.1.1+ - python-version: ["3.8", "3.9"] + python-version: ["3.9"] auth-ssl: "*" display_name: "OpenSSL 1.0.2 ${python-version} ${platform} ${auth-ssl}" tasks: @@ -2739,12 +2729,12 @@ buildvariants: then: add_tasks: *encryption-server-versions -# Storage engine tests on RHEL 8.4 (x86_64) with Python 3.8. +# Storage engine tests on RHEL 8.4 (x86_64) with Python 3.9. - matrix_name: "tests-storage-engines" matrix_spec: platform: rhel8 storage-engine: "*" - python-version: 3.8 + python-version: 3.9 display_name: "Storage ${storage-engine} ${python-version} ${platform}" rules: - if: @@ -2774,12 +2764,12 @@ buildvariants: - "test-3.6-standalone" - "test-3.6-replica_set" -# enableTestCommands=0 tests on RHEL 8.4 (x86_64) with Python 3.8. +# enableTestCommands=0 tests on RHEL 8.4 (x86_64) with Python 3.9. - matrix_name: "test-disableTestCommands" matrix_spec: platform: rhel8 disableTestCommands: "*" - python-version: "3.8" + python-version: "3.9" display_name: "Disable test commands ${python-version} ${platform}" tasks: - ".latest" @@ -2805,7 +2795,7 @@ buildvariants: - matrix_name: "test-search-index-helpers" matrix_spec: platform: rhel8 - python-version: "3.8" + python-version: "3.9" display_name: "Search Index Helpers ${platform}" tasks: - name: "test_atlas_task_group_search_indexes" @@ -2813,7 +2803,7 @@ buildvariants: - matrix_name: "tests-mod-wsgi" matrix_spec: platform: ubuntu-22.04 - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] mod-wsgi-version: "*" display_name: "${mod-wsgi-version} ${python-version} ${platform}" tasks: @@ -2825,7 +2815,7 @@ buildvariants: - matrix_name: "mockupdb-tests" matrix_spec: platform: rhel8 - python-version: 3.8 + python-version: 3.9 display_name: "MockupDB Tests" tasks: - name: "mockupdb" @@ -2833,7 +2823,7 @@ buildvariants: - matrix_name: "tests-doctests" matrix_spec: platform: rhel8 - python-version: ["3.8"] + python-version: ["3.9"] display_name: "Doctests ${python-version} ${platform}" tasks: - name: "doctests" @@ -2873,7 +2863,7 @@ buildvariants: - matrix_name: "data-lake-spec-tests" matrix_spec: platform: ubuntu-22.04 - python-version: ["3.8", "3.10"] + python-version: ["3.9", "3.10"] auth: "auth" c-extensions: "*" display_name: "Atlas Data Lake ${python-version} ${c-extensions}" @@ -2883,7 +2873,7 @@ buildvariants: - matrix_name: "stable-api-tests" matrix_spec: platform: rhel8 - python-version: ["3.8", "3.10"] + python-version: ["3.9", "3.10"] auth: "auth" versionedApi: "*" display_name: "Versioned API ${versionedApi} ${python-version}" @@ -2896,7 +2886,7 @@ buildvariants: - matrix_name: "ocsp-test" matrix_spec: platform: rhel8 - python-version: ["3.8", "3.10", "pypy3.9", "pypy3.10"] + python-version: ["3.9", "3.10", "pypy3.9", "pypy3.10"] mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "latest"] auth: "noauth" ssl: "ssl" @@ -2908,7 +2898,7 @@ buildvariants: - matrix_name: "ocsp-test-windows" matrix_spec: platform: windows - python-version-windows: ["3.8", "3.10"] + python-version-windows: ["3.9", "3.10"] mongodb-version: ["4.4", "5.0", "6.0", "7.0", "8.0", "latest"] auth: "noauth" ssl: "ssl" diff --git a/.evergreen/utils.sh b/.evergreen/utils.sh index 1a5e2a153..d44425a90 100755 --- a/.evergreen/utils.sh +++ b/.evergreen/utils.sh @@ -4,8 +4,8 @@ set -o xtrace find_python3() { PYTHON="" - # Add a fallback system python3 if it is available and Python 3.8+. - if is_python_38 "$(command -v python3)"; then + # Add a fallback system python3 if it is available and Python 3.9+. + if is_python_39 "$(command -v python3)"; then PYTHON="$(command -v python3)" fi # Find a suitable toolchain version, if available. @@ -14,23 +14,23 @@ find_python3() { if [ -d "/Library/Frameworks/Python.Framework/Versions/3.10" ]; then PYTHON="/Library/Frameworks/Python.Framework/Versions/3.10/bin/python3" # macos 10.14 - elif [ -d "/Library/Frameworks/Python.Framework/Versions/3.8" ]; then - PYTHON="/Library/Frameworks/Python.Framework/Versions/3.8/bin/python3" + elif [ -d "/Library/Frameworks/Python.Framework/Versions/3.9" ]; then + PYTHON="/Library/Frameworks/Python.Framework/Versions/3.9/bin/python3" fi elif [ "Windows_NT" = "$OS" ]; then # Magic variable in cygwin - PYTHON="C:/python/Python38/python.exe" + PYTHON="C:/python/Python39/python.exe" else - # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.8+. - if [ -f "/opt/python/3.8/bin/python3" ]; then - PYTHON="/opt/python/3.8/bin/python3" - elif is_python_38 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then + # Prefer our own toolchain, fall back to mongodb toolchain if it has Python 3.9+. + if [ -f "/opt/python/3.9/bin/python3" ]; then + PYTHON="/opt/python/3.9/bin/python3" + elif is_python_39 "$(command -v /opt/mongodbtoolchain/v4/bin/python3)"; then PYTHON="/opt/mongodbtoolchain/v4/bin/python3" - elif is_python_38 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then + elif is_python_39 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then PYTHON="/opt/mongodbtoolchain/v3/bin/python3" fi fi if [ -z "$PYTHON" ]; then - echo "Cannot test without python3.8+ installed!" + echo "Cannot test without python3.9+ installed!" exit 1 fi echo "$PYTHON" @@ -96,15 +96,15 @@ testinstall () { fi } -# Function that returns success if the provided Python binary is version 3.8 or later +# Function that returns success if the provided Python binary is version 3.9 or later # Usage: -# is_python_38 /path/to/python +# is_python_39 /path/to/python # * param1: Python binary -is_python_38() { +is_python_39() { if [ -z "$1" ]; then return 1 - elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 8))"; then - # runs when sys.version_info[:2] >= (3, 8) + elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 9))"; then + # runs when sys.version_info[:2] >= (3, 9) return 0 else return 1 diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 7ec55dd3b..fbc7ff739 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-python@v5 with: cache: 'pip' - python-version: 3.8 + python-version: 3.9 cache-dependency-path: 'pyproject.toml' allow-prereleases: true @@ -79,13 +79,12 @@ jobs: env: CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 CIBW_MANYLINUX_I686_IMAGE: manylinux1 - CIBW_BUILD: "cp38-${{ matrix.buildplat[1] }} cp39-${{ matrix.buildplat[1] }}" + CIBW_BUILD: "cp39-${{ matrix.buildplat[1] }} cp39-${{ matrix.buildplat[1] }}" run: python -m cibuildwheel --output-dir wheelhouse - name: Assert all versions in wheelhouse if: ${{ ! startsWith(matrix.buildplat[1], 'macos') }} run: | - ls wheelhouse/*cp38*.whl ls wheelhouse/*cp39*.whl ls wheelhouse/*cp310*.whl ls wheelhouse/*cp311*.whl @@ -109,7 +108,7 @@ jobs: - uses: actions/setup-python@v5 with: # Build sdist on lowest supported Python - python-version: '3.8' + python-version: '3.9' - name: Build SDist run: | diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 3ecdfa52f..e55444cec 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.9" cache: 'pip' cache-dependency-path: 'pyproject.toml' - name: Install Python dependencies @@ -51,7 +51,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ["3.8", "pypy-3.9", "3.13"] + python-version: ["3.9", "pypy-3.9", "3.13"] name: CPython ${{ matrix.python-version }}-${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -87,7 +87,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.9" cache: 'pip' cache-dependency-path: 'pyproject.toml' - name: Install dependencies @@ -111,7 +111,7 @@ jobs: cache: 'pip' cache-dependency-path: 'pyproject.toml' # Build docs on lowest supported Python for furo - python-version: '3.8' + python-version: '3.9' - name: Install dependencies run: | pip install -U pip hatch @@ -129,7 +129,7 @@ jobs: cache: 'pip' cache-dependency-path: 'pyproject.toml' # Build docs on lowest supported Python for furo - python-version: '3.8' + python-version: '3.9' - name: Install dependencies run: | pip install -U pip hatch @@ -142,7 +142,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.8", "3.11"] + python: ["3.9", "3.11"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -167,7 +167,7 @@ jobs: cache: 'pip' cache-dependency-path: 'pyproject.toml' # Build sdist on lowest supported Python - python-version: '3.8' + python-version: '3.9' - name: Build SDist shell: bash run: | @@ -199,7 +199,7 @@ jobs: cache: 'pip' cache-dependency-path: 'sdist/test/pyproject.toml' # Test sdist on lowest supported Python - python-version: '3.8' + python-version: '3.9' - name: Start MongoDB uses: supercharge/mongodb-github-action@1.11.0 - name: Run connect test from sdist diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c2a5f431..7516fbc9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ be of interest or that has already been addressed. ## Supported Interpreters -PyMongo supports CPython 3.8+ and PyPy3.9+. Language features not +PyMongo supports CPython 3.9+ and PyPy3.9+. Language features not supported by all interpreters can not be used. ## Style Guide diff --git a/README.md b/README.md index 1076b6637..9b5aa33f7 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ package that is incompatible with PyMongo. ## Dependencies -PyMongo supports CPython 3.8+ and PyPy3.9+. +PyMongo supports CPython 3.9+ and PyPy3.9+. Required dependencies: diff --git a/doc/changelog.rst b/doc/changelog.rst index 574ecad76..a73a89a0e 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +Changes in Version 4.11.0 +------------------------- + +.. warning:: PyMongo 4.11 drops support for Python 3.8: Python 3.9+ or PyPy 3.9+ is now required. + Changes in Version 4.10.1 ------------------------- diff --git a/doc/faq.rst b/doc/faq.rst index f0463bada..15950e771 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -166,7 +166,7 @@ they are returned to the pool. Does PyMongo support Python 3? ------------------------------ -PyMongo supports CPython 3.8+ and PyPy3.9+. See the :doc:`python3` for details. +PyMongo supports CPython 3.9+ and PyPy3.9+. See the :doc:`python3` for details. Does PyMongo support asynchronous frameworks like Gevent, asyncio, Tornado, or Twisted? --------------------------------------------------------------------------------------- diff --git a/doc/installation.rst b/doc/installation.rst index ee83b30c6..dd8eb6ab4 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -28,7 +28,7 @@ To upgrade using pip:: Dependencies ------------ -PyMongo supports CPython 3.8+ and PyPy3.9+. +PyMongo supports CPython 3.9+ and PyPy3.9+. Required dependencies ..................... @@ -140,7 +140,7 @@ See `http://bugs.python.org/issue11623 `_ for a more detailed explanation. **Lion (10.7) and newer** - PyMongo's C extensions can be built against -versions of Python 3.8+ downloaded from python.org. In all cases Xcode must be +versions of Python 3.9+ downloaded from python.org. In all cases Xcode must be installed with 'UNIX Development Support'. **Xcode 5.1**: Starting with version 5.1 the version of clang that ships with diff --git a/doc/python3.rst b/doc/python3.rst index 148c5ee45..1ea43b3cc 100644 --- a/doc/python3.rst +++ b/doc/python3.rst @@ -4,7 +4,7 @@ Python 3 FAQ What Python 3 versions are supported? ------------------------------------- -PyMongo supports CPython 3.8+ and PyPy3.9+. +PyMongo supports CPython 3.9+ and PyPy3.9+. Are there any PyMongo behavior changes with Python 3? ----------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index 30c7c046b..2688aab27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version", "dependencies", "optional-dependencies"] description = "Python driver for MongoDB " readme = "README.md" license = {file="LICENSE"} -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [ { name = "The MongoDB Python Team" }, ] @@ -30,7 +30,6 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/test/asynchronous/conftest.py b/test/asynchronous/conftest.py index c08f224ab..e443dff6c 100644 --- a/test/asynchronous/conftest.py +++ b/test/asynchronous/conftest.py @@ -17,8 +17,6 @@ def event_loop_policy(): # has issues with sharing sockets across loops (https://github.com/python/cpython/issues/122240) # We explicitly use a different loop implementation here to prevent that issue if sys.platform == "win32": - # Needed for Python 3.8. - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) return asyncio.WindowsSelectorEventLoopPolicy() # type: ignore[attr-defined] return asyncio.get_event_loop_policy() diff --git a/test/conftest.py b/test/conftest.py index ca817a5a6..a3d954c7c 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -15,8 +15,6 @@ def event_loop_policy(): # has issues with sharing sockets across loops (https://github.com/python/cpython/issues/122240) # We explicitly use a different loop implementation here to prevent that issue if sys.platform == "win32": - # Needed for Python 3.8. - asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) return asyncio.WindowsSelectorEventLoopPolicy() # type: ignore[attr-defined] return asyncio.get_event_loop_policy() From d21a8ddcff0ce9d54fe5b353bd4477936a02528e Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Tue, 8 Oct 2024 15:14:54 -0400 Subject: [PATCH 07/11] PYTHON-4827 - Fix dnspython typechecking failures (#1903) Co-authored-by: Steven Silvester --- pymongo/srv_resolver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pymongo/srv_resolver.py b/pymongo/srv_resolver.py index 6f6cc285f..5be6cb98d 100644 --- a/pymongo/srv_resolver.py +++ b/pymongo/srv_resolver.py @@ -99,7 +99,7 @@ class _SrvResolver: raise ConfigurationError(str(exc)) from None if len(results) > 1: raise ConfigurationError("Only one TXT record is supported") - return (b"&".join([b"".join(res.strings) for res in results])).decode("utf-8") + return (b"&".join([b"".join(res.strings) for res in results])).decode("utf-8") # type: ignore[attr-defined] def _resolve_uri(self, encapsulate_errors: bool) -> resolver.Answer: try: @@ -121,7 +121,8 @@ class _SrvResolver: # Construct address tuples nodes = [ - (maybe_decode(res.target.to_text(omit_final_dot=True)), res.port) for res in results + (maybe_decode(res.target.to_text(omit_final_dot=True)), res.port) # type: ignore[attr-defined] + for res in results ] # Validate hosts From 8f32f3cd245b8bebd2d91469aa7477af2bf5ce38 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Tue, 8 Oct 2024 15:52:16 -0400 Subject: [PATCH 08/11] PYTHON-4831 - Remove pytz from examples (#1904) Co-authored-by: Steven Silvester --- doc/examples/datetimes.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/examples/datetimes.rst b/doc/examples/datetimes.rst index 179050642..a8c047690 100644 --- a/doc/examples/datetimes.rst +++ b/doc/examples/datetimes.rst @@ -70,9 +70,9 @@ those datetimes to UTC automatically: .. doctest:: - >>> import pytz - >>> pacific = pytz.timezone("US/Pacific") - >>> aware_datetime = pacific.localize(datetime.datetime(2002, 10, 27, 6, 0, 0)) + >>> from zoneinfo import ZoneInfo + >>> from datetime import datetime + >>> aware_datetime = datetime(2002, 10, 27, 6, 0, 0, tzinfo=ZoneInfo("US/Pacific")) >>> result = db.times.insert_one({"date": aware_datetime}) >>> db.times.find_one()["date"] datetime.datetime(2002, 10, 27, 14, 0) @@ -97,7 +97,7 @@ out of MongoDB in US/Pacific time: datetime.datetime(2002, 10, 27, 14, 0) >>> aware_times = db.times.with_options(codec_options=CodecOptions( ... tz_aware=True, - ... tzinfo=pytz.timezone('US/Pacific'))) + ... tzinfo=ZoneInfo("US/Pacific"))) >>> result = aware_times.find_one()['date'] datetime.datetime(2002, 10, 27, 6, 0, # doctest: +NORMALIZE_WHITESPACE tzinfo=) From 5fa4380324b7109edce24ad1cd97f3eec6bc7697 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Wed, 9 Oct 2024 10:44:41 -0400 Subject: [PATCH 09/11] PYTHON-4784 - Add tests to confirm async parallelism (#1886) --- test/asynchronous/test_concurrency.py | 54 +++++++++++++++++++++++++++ tools/synchro.py | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 test/asynchronous/test_concurrency.py diff --git a/test/asynchronous/test_concurrency.py b/test/asynchronous/test_concurrency.py new file mode 100644 index 000000000..1683b8413 --- /dev/null +++ b/test/asynchronous/test_concurrency.py @@ -0,0 +1,54 @@ +# Copyright 2024-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. + +"""Tests to ensure that the async API is properly concurrent with asyncio.""" +from __future__ import annotations + +import asyncio +import time +from test.asynchronous import AsyncIntegrationTest, async_client_context +from test.utils import delay + +_IS_SYNC = False + + +class TestAsyncConcurrency(AsyncIntegrationTest): + async def _task(self, client): + await client.db.test.find_one({"$where": delay(0.20)}) + + async def test_concurrency(self): + tasks = [] + iterations = 5 + + client = await self.async_single_client() + await client.db.test.drop() + await client.db.test.insert_one({"x": 1}) + + start = time.time() + + for _ in range(iterations): + await self._task(client) + + sequential_time = time.time() - start + start = time.time() + + for i in range(iterations): + tasks.append(self._task(client)) + + await asyncio.gather(*tasks) + concurrent_time = time.time() - start + + percent_faster = (sequential_time - concurrent_time) / concurrent_time * 100 + # We expect the concurrent tasks to be at least 75% faster on all platforms as a conservative benchmark + self.assertGreaterEqual(percent_faster, 75) diff --git a/tools/synchro.py b/tools/synchro.py index 585fc5fef..5ce83cfbe 100644 --- a/tools/synchro.py +++ b/tools/synchro.py @@ -152,7 +152,7 @@ gridfs_files = [ def async_only_test(f: str) -> bool: """Return True for async tests that should not be converted to sync.""" - return f in ["test_locks.py"] + return f in ["test_locks.py", "test_concurrency.py"] test_files = [ From ac198af557410bce4809138c0089e1e56ff6db87 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Wed, 9 Oct 2024 09:58:20 -0700 Subject: [PATCH 10/11] PYTHON-4729 Drop support for MongoDB 3.6 (#1905) --- .evergreen/config.yml | 52 ++++--------------- README.md | 2 +- doc/changelog.rst | 15 ++++++ doc/common-issues.rst | 6 +-- doc/examples/authentication.rst | 5 +- pymongo/asynchronous/collection.py | 5 -- pymongo/asynchronous/mongo_client.py | 5 +- pymongo/common.py | 4 +- pymongo/synchronous/collection.py | 5 -- pymongo/synchronous/mongo_client.py | 5 +- test/asynchronous/test_client.py | 8 +-- .../rs/null_election_id-pre-6.0.json | 2 +- test/mockupdb/test_auth_recovering_member.py | 4 +- test/mockupdb/test_cluster_time.py | 7 ++- test/mockupdb/test_cursor.py | 3 +- test/mockupdb/test_cursor_namespace.py | 5 +- test/mockupdb/test_getmore_sharded.py | 8 ++- test/mockupdb/test_handshake.py | 23 ++++++-- test/mockupdb/test_initial_ismaster.py | 10 ++-- test/mockupdb/test_list_indexes.py | 3 +- test/mockupdb/test_max_staleness.py | 6 ++- test/mockupdb/test_mixed_version_sharded.py | 2 - .../mockupdb/test_mongos_command_read_mode.py | 13 ++++- .../test_network_disconnect_primary.py | 9 +++- test/mockupdb/test_op_msg_read_preference.py | 9 ++-- test/mockupdb/test_query_read_pref_sharded.py | 8 ++- test/mockupdb/test_reset_and_request_check.py | 6 ++- test/mockupdb/test_slave_okay_rs.py | 10 +++- test/mockupdb/test_slave_okay_sharded.py | 7 ++- test/mockupdb/test_slave_okay_single.py | 3 +- test/test_client.py | 8 +-- test/test_discovery_and_monitoring.py | 7 ++- test/test_server_description.py | 4 +- test/test_topology.py | 50 +++++++++++++----- test/utils_selection_tests.py | 4 +- 35 files changed, 191 insertions(+), 132 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 7fb48c805..a345e4f5b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1014,33 +1014,6 @@ tasks: TOPOLOGY: "server" - func: "run doctests" - - name: "test-3.6-standalone" - tags: ["3.6", "standalone"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - VERSION: "3.6" - TOPOLOGY: "server" - - func: "run tests" - - - name: "test-3.6-replica_set" - tags: ["3.6", "replica_set"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - VERSION: "3.6" - TOPOLOGY: "replica_set" - - func: "run tests" - - - name: "test-3.6-sharded_cluster" - tags: ["3.6", "sharded_cluster"] - commands: - - func: "bootstrap mongo-orchestration" - vars: - VERSION: "3.6" - TOPOLOGY: "sharded_cluster" - - func: "run tests" - - name: "test-4.0-standalone" tags: ["4.0", "standalone"] commands: @@ -2186,10 +2159,6 @@ axes: - id: mongodb-version display_name: "MongoDB" values: - - id: "3.6" - display_name: "MongoDB 3.6" - variables: - VERSION: "3.6" - id: "4.0" display_name: "MongoDB 4.0" variables: @@ -2490,7 +2459,6 @@ buildvariants: - ".4.4" - ".4.2" - ".4.0" - - ".3.6" - matrix_name: "test-macos-arm64" matrix_spec: @@ -2562,7 +2530,6 @@ buildvariants: - ".4.4" - ".4.2" - ".4.0" - - ".3.6" - matrix_name: "tests-pyopenssl" matrix_spec: @@ -2657,19 +2624,22 @@ buildvariants: display_name: "${compression} ${c-extensions} ${python-version} ${platform}" tasks: - "test-latest-standalone" + - "test-8.0-standalone" + - "test-7.0-standalone" + - "test-6.0-standalone" - "test-5.0-standalone" - "test-4.4-standalone" - "test-4.2-standalone" + - "test-4.0-standalone" rules: - # Server versions 3.6 and 4.0 support snappy and zlib. + # Server version 4.0 supports snappy and zlib but not zstd. - if: python-version: "*" c-extensions: "*" - compression: ["snappy", "zlib"] + compression: ["zstd"] then: - add_tasks: + remove_tasks: - "test-4.0-standalone" - - "test-3.6-standalone" - matrix_name: "tests-python-version-green-framework-rhel8" matrix_spec: @@ -2734,7 +2704,7 @@ buildvariants: matrix_spec: platform: rhel8 storage-engine: "*" - python-version: 3.9 + python-version: "3.9" display_name: "Storage ${storage-engine} ${python-version} ${platform}" rules: - if: @@ -2751,7 +2721,6 @@ buildvariants: - "test-4.4-standalone" - "test-4.2-standalone" - "test-4.0-standalone" - - "test-3.6-standalone" - if: # MongoDB 4.2 drops support for MMAPv1 platform: rhel8 @@ -2761,8 +2730,6 @@ buildvariants: add_tasks: - "test-4.0-standalone" - "test-4.0-replica_set" - - "test-3.6-standalone" - - "test-3.6-replica_set" # enableTestCommands=0 tests on RHEL 8.4 (x86_64) with Python 3.9. - matrix_name: "test-disableTestCommands" @@ -2881,6 +2848,9 @@ buildvariants: tasks: # Versioned API was introduced in MongoDB 4.7 - "test-latest-standalone" + - "test-8.0-standalone" + - "test-7.0-standalone" + - "test-6.0-standalone" - "test-5.0-standalone" - matrix_name: "ocsp-test" diff --git a/README.md b/README.md index 9b5aa33f7..f5e2cdf46 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ a native Python driver for MongoDB. The `gridfs` package is a [gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst/) implementation on top of `pymongo`. -PyMongo supports MongoDB 3.6, 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0. +PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0. ## Support / Feedback diff --git a/doc/changelog.rst b/doc/changelog.rst index a73a89a0e..6a118f56c 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -5,6 +5,21 @@ Changes in Version 4.11.0 ------------------------- .. warning:: PyMongo 4.11 drops support for Python 3.8: Python 3.9+ or PyPy 3.9+ is now required. +.. warning:: PyMongo 4.11 drops support for MongoDB 3.6. PyMongo now supports MongoDB 4.0+. + Driver support for MongoDB 3.6 reached end of life in April 2024. + +PyMongo 4.11 brings a number of changes including: + +- Dropped support for Python 3.8. +- Dropped support for MongoDB 3.6. + +Issues Resolved +............... + +See the `PyMongo 4.11 release notes in JIRA`_ for the list of resolved issues +in this release. + +.. _PyMongo 4.11 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=40784 Changes in Version 4.10.1 ------------------------- diff --git a/doc/common-issues.rst b/doc/common-issues.rst index 3d2d06a5a..b300bac78 100644 --- a/doc/common-issues.rst +++ b/doc/common-issues.rst @@ -6,14 +6,14 @@ Also see the :ref:`TLSErrors` section. Server reports wire version X, PyMongo requires Y ------------------------------------------------- -When one attempts to connect to a <=3.4 version server, PyMongo will throw the following error:: +When one attempts to connect to a <=3.6 version server, PyMongo will throw the following error:: >>> client.admin.command('ping') ... - pymongo.errors.ConfigurationError: Server at localhost:27017 reports wire version 5, but this version of PyMongo requires at least 6 (MongoDB 3.6). + pymongo.errors.ConfigurationError: Server at localhost:27017 reports wire version 6, but this version of PyMongo requires at least 7 (MongoDB 4.0). This is caused by the driver being too new for the server it is being run against. -To resolve this issue either upgrade your database to version >= 3.6 or downgrade to PyMongo 3.x which supports MongoDB >= 2.6. +To resolve this issue either upgrade your database to version >= 4.0 or downgrade to an early version of PyMongo which supports MongoDB < 4.0. 'Cursor' object has no attribute '_Cursor__killed' diff --git a/doc/examples/authentication.rst b/doc/examples/authentication.rst index 24b3cff8d..6c89910f3 100644 --- a/doc/examples/authentication.rst +++ b/doc/examples/authentication.rst @@ -97,9 +97,8 @@ the "MongoDB Challenge-Response" protocol:: Default Authentication Mechanism -------------------------------- -If no mechanism is specified, PyMongo automatically SCRAM-SHA-1 when connected -to MongoDB 3.6 and negotiates the mechanism to use (SCRAM-SHA-1 -or SCRAM-SHA-256) when connected to MongoDB 4.0+. +If no mechanism is specified, PyMongo automatically negotiates the mechanism to use (SCRAM-SHA-1 +or SCRAM-SHA-256) with the MongoDB server. Default Database and "authSource" --------------------------------- diff --git a/pymongo/asynchronous/collection.py b/pymongo/asynchronous/collection.py index 5abc41a7e..4ddcbab4d 100644 --- a/pymongo/asynchronous/collection.py +++ b/pymongo/asynchronous/collection.py @@ -1960,20 +1960,15 @@ class AsyncCollection(common.BaseObject, Generic[_DocumentType]): collation: Optional[Collation], ) -> int: """Internal count command helper.""" - # XXX: "ns missing" checks can be removed when we drop support for - # MongoDB 3.0, see SERVER-17051. res = await self._command( conn, cmd, read_preference=read_preference, - allowable_errors=["ns missing"], codec_options=self._write_response_codec_options, read_concern=self.read_concern, collation=collation, session=session, ) - if res.get("errmsg", "") == "ns missing": - return 0 return int(res["n"]) async def _aggregate_one_result( diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index 814c60456..bfae302da 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -498,9 +498,8 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]): - `authSource`: The database to authenticate on. Defaults to the database specified in the URI, if provided, or to "admin". - `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options. - If no mechanism is specified, PyMongo automatically SCRAM-SHA-1 - when connected to MongoDB 3.6 and negotiates the mechanism to use - (SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+. + If no mechanism is specified, PyMongo automatically negotiates the + mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server. - `authMechanismProperties`: Used to specify authentication mechanism specific options. To specify the service name for GSSAPI authentication pass authMechanismProperties='SERVICE_NAME: int: """Internal count command helper.""" - # XXX: "ns missing" checks can be removed when we drop support for - # MongoDB 3.0, see SERVER-17051. res = self._command( conn, cmd, read_preference=read_preference, - allowable_errors=["ns missing"], codec_options=self._write_response_codec_options, read_concern=self.read_concern, collation=collation, session=session, ) - if res.get("errmsg", "") == "ns missing": - return 0 return int(res["n"]) def _aggregate_one_result( diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index b2dff5b4a..1351cb200 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -496,9 +496,8 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]): - `authSource`: The database to authenticate on. Defaults to the database specified in the URI, if provided, or to "admin". - `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options. - If no mechanism is specified, PyMongo automatically SCRAM-SHA-1 - when connected to MongoDB 3.6 and negotiates the mechanism to use - (SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+. + If no mechanism is specified, PyMongo automatically negotiates the + mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server. - `authMechanismProperties`: Used to specify authentication mechanism specific options. To specify the service name for GSSAPI authentication pass authMechanismProperties='SERVICE_NAME: Date: Wed, 9 Oct 2024 14:07:44 -0500 Subject: [PATCH 11/11] PYTHON-4818 Use OCSP Scripts from Drivers-Tools (#1895) --- .evergreen/config.yml | 121 ++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 74 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index a345e4f5b..1ef875150 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -651,63 +651,16 @@ functions: CA_FILE="${DRIVERS_TOOLS}/.evergreen/ocsp/${OCSP_ALGORITHM}/ca.pem" \ OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ bash ${PROJECT_DIRECTORY}/.evergreen/hatch.sh test:test-eg + bash ${DRIVERS_TOOLS}/.evergreen/ocsp/teardown.sh - run-valid-ocsp-server: - - command: shell.exec + "run-ocsp-server": + - command: subprocess.exec params: background: true - script: | - . src/.evergreen/scripts/env.sh - cd ${DRIVERS_TOOLS}/.evergreen/ocsp - . ./activate-ocspvenv.sh - python ocsp_mock.py \ - --ca_file ${OCSP_ALGORITHM}/ca.pem \ - --ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \ - --ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \ - -p 8100 -v - run-revoked-ocsp-server: - - command: shell.exec - params: - background: true - script: | - . src/.evergreen/scripts/env.sh - cd ${DRIVERS_TOOLS}/.evergreen/ocsp - . ./activate-ocspvenv.sh - python ocsp_mock.py \ - --ca_file ${OCSP_ALGORITHM}/ca.pem \ - --ocsp_responder_cert ${OCSP_ALGORITHM}/ca.crt \ - --ocsp_responder_key ${OCSP_ALGORITHM}/ca.key \ - -p 8100 \ - -v \ - --fault revoked - run-valid-delegate-ocsp-server: - - command: shell.exec - params: - background: true - script: | - . src/.evergreen/scripts/env.sh - cd ${DRIVERS_TOOLS}/.evergreen/ocsp - . ./activate-ocspvenv.sh - python ocsp_mock.py \ - --ca_file ${OCSP_ALGORITHM}/ca.pem \ - --ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \ - --ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \ - -p 8100 -v - run-revoked-delegate-ocsp-server: - - command: shell.exec - params: - background: true - script: | - . src/.evergreen/scripts/env.sh - cd ${DRIVERS_TOOLS}/.evergreen/ocsp - . ./activate-ocspvenv.sh - python ocsp_mock.py \ - --ca_file ${OCSP_ALGORITHM}/ca.pem \ - --ocsp_responder_cert ${OCSP_ALGORITHM}/ocsp-responder.crt \ - --ocsp_responder_key ${OCSP_ALGORITHM}/ocsp-responder.key \ - -p 8100 \ - -v \ - --fault revoked + binary: bash + include_expansions_in_env: [SERVER_TYPE, OCSP_ALGORITHM] + args: + - ${DRIVERS_TOOLS}/.evergreen/ocsp/setup.sh "run load-balancer": - command: shell.exec @@ -1360,9 +1313,10 @@ tasks: - name: test-ocsp-rsa-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] commands: - - func: run-valid-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: "valid" - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json" @@ -1374,9 +1328,10 @@ tasks: - name: test-ocsp-rsa-invalid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: "revoked" - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json" @@ -1388,9 +1343,10 @@ tasks: - name: test-ocsp-rsa-valid-cert-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-valid-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: valid - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json" @@ -1402,9 +1358,10 @@ tasks: - name: test-ocsp-rsa-invalid-cert-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: revoked - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json" @@ -1427,9 +1384,10 @@ tasks: - name: test-ocsp-rsa-malicious-invalid-cert-mustStaple-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: revoked - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple-disableStapling.json" @@ -1452,9 +1410,10 @@ tasks: - name: test-ocsp-rsa-delegate-valid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] commands: - - func: run-valid-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: valid-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json" @@ -1466,9 +1425,10 @@ tasks: - name: test-ocsp-rsa-delegate-invalid-cert-server-staples tags: ["ocsp", "ocsp-rsa", "ocsp-staple"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: revoked-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple.json" @@ -1480,9 +1440,10 @@ tasks: - name: test-ocsp-rsa-delegate-valid-cert-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-valid-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: valid-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json" @@ -1494,9 +1455,10 @@ tasks: - name: test-ocsp-rsa-delegate-invalid-cert-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: revoked-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-disableStapling.json" @@ -1508,9 +1470,10 @@ tasks: - name: test-ocsp-rsa-delegate-malicious-invalid-cert-mustStaple-server-does-not-staple tags: ["ocsp", "ocsp-rsa"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "rsa" + SERVER_TYPE: revoked-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "rsa-basic-tls-ocsp-mustStaple-disableStapling.json" @@ -1522,9 +1485,10 @@ tasks: - name: test-ocsp-ecdsa-valid-cert-server-staples tags: ["ocsp", "ocsp-ecdsa", "ocsp-staple"] commands: - - func: run-valid-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: valid - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json" @@ -1536,9 +1500,10 @@ tasks: - name: test-ocsp-ecdsa-invalid-cert-server-staples tags: ["ocsp", "ocsp-ecdsa", "ocsp-staple"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: revoked - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json" @@ -1550,9 +1515,10 @@ tasks: - name: test-ocsp-ecdsa-valid-cert-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-valid-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: valid - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json" @@ -1564,9 +1530,10 @@ tasks: - name: test-ocsp-ecdsa-invalid-cert-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: revoked - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json" @@ -1589,9 +1556,10 @@ tasks: - name: test-ocsp-ecdsa-malicious-invalid-cert-mustStaple-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-revoked-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: revoked - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json" @@ -1614,9 +1582,10 @@ tasks: - name: test-ocsp-ecdsa-delegate-valid-cert-server-staples tags: ["ocsp", "ocsp-ecdsa", "ocsp-staple"] commands: - - func: run-valid-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: valid-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json" @@ -1628,9 +1597,10 @@ tasks: - name: test-ocsp-ecdsa-delegate-invalid-cert-server-staples tags: ["ocsp", "ocsp-ecdsa", "ocsp-staple"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: revoked-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple.json" @@ -1642,9 +1612,10 @@ tasks: - name: test-ocsp-ecdsa-delegate-valid-cert-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-valid-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: valid-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json" @@ -1656,9 +1627,10 @@ tasks: - name: test-ocsp-ecdsa-delegate-invalid-cert-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: revoked-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-disableStapling.json" @@ -1670,9 +1642,10 @@ tasks: - name: test-ocsp-ecdsa-delegate-malicious-invalid-cert-mustStaple-server-does-not-staple tags: ["ocsp", "ocsp-ecdsa"] commands: - - func: run-revoked-delegate-ocsp-server + - func: run-ocsp-server vars: OCSP_ALGORITHM: "ecdsa" + SERVER_TYPE: valid-delegate - func: "bootstrap mongo-orchestration" vars: ORCHESTRATION_FILE: "ecdsa-basic-tls-ocsp-mustStaple-disableStapling.json"