diff --git a/.evergreen/config.yml b/.evergreen/config.yml index c54c688e4..ee29d65f2 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -304,17 +304,6 @@ functions: args: - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh - "run perf tests": - - command: subprocess.exec - type: test - params: - working_dir: "src" - binary: bash - include_expansions_in_env: [SUB_TEST_NAME] - args: - - .evergreen/scripts/run-with-env.sh - - .evergreen/scripts/run-perf-tests.sh - "attach benchmark test results": - command: attach.results params: @@ -461,84 +450,6 @@ tasks: commands: - func: "download and merge coverage" - - name: "perf-6.0-standalone" - tags: ["perf"] - commands: - - func: "run server" - vars: - VERSION: "v6.0-perf" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "sync" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "perf-6.0-standalone-ssl" - tags: ["perf"] - commands: - - func: "run server" - vars: - VERSION: "v6.0-perf" - SSL: "ssl" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "sync" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "perf-8.0-standalone" - tags: ["perf"] - commands: - - func: "run server" - vars: - VERSION: "8.0" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "sync" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "perf-6.0-standalone-async" - tags: [ "perf" ] - commands: - - func: "run server" - vars: - VERSION: "v6.0-perf" - TOPOLOGY: "server" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "async" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "perf-6.0-standalone-ssl-async" - tags: [ "perf" ] - commands: - - func: "run server" - vars: - VERSION: "v6.0-perf" - TOPOLOGY: "server" - SSL: "ssl" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "async" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "perf-8.0-standalone-async" - tags: [ "perf" ] - commands: - - func: "run server" - vars: - VERSION: "8.0" - TOPOLOGY: "server" - - func: "run perf tests" - vars: - SUB_TEST_NAME: "async" - - func: "attach benchmark test results" - - func: "send dashboard data" - - - name: "check-import-time" tags: ["pr"] commands: @@ -610,15 +521,3 @@ buildvariants: - rhel8.7-small tasks: - name: "backport-pr" - -- name: "perf-tests" - display_name: "Performance Benchmarks" - batchtime: 10080 # 7 days - run_on: rhel90-dbx-perf-large - tasks: - - name: "perf-6.0-standalone" - - name: "perf-6.0-standalone-ssl" - - name: "perf-8.0-standalone" - - name: "perf-6.0-standalone-async" - - name: "perf-6.0-standalone-ssl-async" - - name: "perf-8.0-standalone-async" diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 070b163e9..5b5cf92d6 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -1151,6 +1151,60 @@ tasks: SUB_TEST_NAME: gke tags: [auth_oidc, auth_oidc_remote] + # Perf tests + - name: perf-8.0-standalone-ssl + commands: + - func: run server + vars: + VERSION: v8.0-perf + SSL: ssl + - func: run tests + vars: + TEST_NAME: perf + SUB_TEST_NAME: sync + - func: attach benchmark test results + - func: send dashboard data + tags: [perf] + - name: perf-8.0-standalone-ssl-async + commands: + - func: run server + vars: + VERSION: v8.0-perf + SSL: ssl + - func: run tests + vars: + TEST_NAME: perf + SUB_TEST_NAME: async + - func: attach benchmark test results + - func: send dashboard data + tags: [perf] + - name: perf-8.0-standalone + commands: + - func: run server + vars: + VERSION: v8.0-perf + SSL: nossl + - func: run tests + vars: + TEST_NAME: perf + SUB_TEST_NAME: sync + - func: attach benchmark test results + - func: send dashboard data + tags: [perf] + - name: perf-8.0-standalone-async + commands: + - func: run server + vars: + VERSION: v8.0-perf + SSL: nossl + - func: run tests + vars: + TEST_NAME: perf + SUB_TEST_NAME: async + - func: attach benchmark test results + - func: send dashboard data + tags: [perf] + # Server tests - name: test-4.0-standalone-auth-ssl-sync commands: diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index d70afa2bd..864b061a1 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -928,6 +928,15 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 + # Perf tests + - name: performance-benchmarks + tasks: + - name: .perf + display_name: Performance Benchmarks + run_on: + - rhel90-dbx-perf-large + batchtime: 10080 + # Pyopenssl tests - name: pyopenssl-macos-python3.9 tasks: diff --git a/.evergreen/run-perf-tests.sh b/.evergreen/run-perf-tests.sh deleted file mode 100755 index cf88b9371..000000000 --- a/.evergreen/run-perf-tests.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -o xtrace -set -o errexit - -git clone --depth 1 https://github.com/mongodb/specifications.git -pushd specifications/source/benchmarking/data -tar xf extended_bson.tgz -tar xf parallel.tgz -tar xf single_and_multi_document.tgz -popd - -export TEST_PATH="${PROJECT_DIRECTORY}/specifications/source/benchmarking/data" -export OUTPUT_FILE="${PROJECT_DIRECTORY}/results.json" - -export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 - -bash ./.evergreen/just.sh setup-tests perf "${SUB_TEST_NAME}" -bash ./.evergreen/just.sh run-tests diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index f9a853f27..40336c6d2 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -31,9 +31,10 @@ if [ -f "./secrets-export.sh" ]; then fi # List the packages. -PIP_QUIET=0 uv run ${UV_ARGS} --with pip pip list +uv sync ${UV_ARGS} --reinstall +uv pip list # Start the test runner. -uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@" +uv run .evergreen/scripts/run_tests.py "$@" popd diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index b90a6af43..b9f937706 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -69,6 +69,7 @@ HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64", dict HOSTS["ubuntu20"] = Host("ubuntu20", "ubuntu2004-small", "Ubuntu-20", dict()) HOSTS["ubuntu22"] = Host("ubuntu22", "ubuntu2204-small", "Ubuntu-22", dict()) HOSTS["rhel7"] = Host("rhel7", "rhel79-small", "RHEL7", dict()) +HOSTS["perf"] = Host("perf", "rhel90-dbx-perf-large", "", dict()) DEFAULT_HOST = HOSTS["rhel8"] # Other hosts @@ -722,6 +723,13 @@ def create_atlas_connect_variants(): ] +def create_perf_variants(): + host = HOSTS["perf"] + return [ + create_variant([".perf"], "Performance Benchmarks", host=host, batchtime=BATCHTIME_WEEK) + ] + + def create_aws_auth_variants(): variants = [] @@ -942,6 +950,26 @@ def create_enterprise_auth_tasks(): return [EvgTask(name=task_name, tags=tags, commands=[server_func, assume_func, test_func])] +def create_perf_tasks(): + tasks = [] + for version, ssl, sync in product(["8.0"], ["ssl", "nossl"], ["sync", "async"]): + vars = dict(VERSION=f"v{version}-perf", SSL=ssl) + server_func = FunctionCall(func="run server", vars=vars) + vars = dict(TEST_NAME="perf", SUB_TEST_NAME=sync) + test_func = FunctionCall(func="run tests", vars=vars) + attach_func = FunctionCall(func="attach benchmark test results") + send_func = FunctionCall(func="send dashboard data") + task_name = f"perf-{version}-standalone" + if ssl == "ssl": + task_name += "-ssl" + if sync == "async": + task_name += "-async" + tags = ["perf"] + commands = [server_func, test_func, attach_func, send_func] + tasks.append(EvgTask(name=task_name, tags=tags, commands=commands)) + return tasks + + def create_ocsp_tasks(): tasks = [] tests = [ diff --git a/.evergreen/scripts/run-perf-tests.sh b/.evergreen/scripts/run-perf-tests.sh deleted file mode 100755 index e1c1311d6..000000000 --- a/.evergreen/scripts/run-perf-tests.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -PROJECT_DIRECTORY=${PROJECT_DIRECTORY} -SUB_TEST_NAME=${SUB_TEST_NAME} bash "${PROJECT_DIRECTORY}"/.evergreen/run-perf-tests.sh diff --git a/.evergreen/scripts/run_tests.py b/.evergreen/scripts/run_tests.py index 13a510475..2e23a366b 100644 --- a/.evergreen/scripts/run_tests.py +++ b/.evergreen/scripts/run_tests.py @@ -4,7 +4,6 @@ import json import logging import os import platform -import shutil import sys from datetime import datetime @@ -142,10 +141,6 @@ def run() -> None: if TEST_PERF: handle_perf(start_time) - # Handle coverage post actions. - if os.environ.get("COVERAGE"): - shutil.rmtree(".pytest_cache", ignore_errors=True) - if __name__ == "__main__": run() diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index 59928271c..6d7c8037c 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -43,6 +43,9 @@ EXTRAS_MAP = { # Map the test name to test group. GROUP_MAP = dict(mockupdb="mockupdb", perf="perf") +# The python version used for perf tests. +PERF_PYTHON_VERSION = "3.9.13" + def is_set(var: str) -> bool: value = os.environ.get(var, "") @@ -362,6 +365,19 @@ def handle_test_env() -> None: write_env("DISABLE_CONTEXT") if test_name == "perf": + data_dir = ROOT / "specifications/source/benchmarking/data" + if not data_dir.exists(): + run_command("git clone --depth 1 https://github.com/mongodb/specifications.git") + run_command("tar xf extended_bson.tgz", cwd=data_dir) + run_command("tar xf parallel.tgz", cwd=data_dir) + run_command("tar xf single_and_multi_document.tgz", cwd=data_dir) + write_env("TEST_PATH", str(data_dir)) + write_env("OUTPUT_FILE", str(ROOT / "results.json")) + # Overwrite the UV_PYTHON from the env.sh file. + write_env("UV_PYTHON", "") + + UV_ARGS.append(f"--python={PERF_PYTHON_VERSION}") + # PYTHON-4769 Run perf_test.py directly otherwise pytest's test collection negatively # affects the benchmark results. if sub_test_name == "sync": diff --git a/.evergreen/scripts/teardown_tests.py b/.evergreen/scripts/teardown_tests.py index 750d2a065..b08147842 100644 --- a/.evergreen/scripts/teardown_tests.py +++ b/.evergreen/scripts/teardown_tests.py @@ -1,9 +1,11 @@ from __future__ import annotations import os +import shutil import sys +from pathlib import Path -from utils import DRIVERS_TOOLS, LOGGER, run_command +from utils import DRIVERS_TOOLS, LOGGER, ROOT, run_command TEST_NAME = os.environ.get("TEST_NAME", "unconfigured") SUB_TEST_NAME = os.environ.get("SUB_TEST_NAME") @@ -44,10 +46,19 @@ elif TEST_NAME == "serverless": elif TEST_NAME == "auth_aws" and sys.platform != "darwin": run_command(f"bash {DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh") +# Tear down perf if applicable. +elif TEST_NAME == "perf": + shutil.rmtree(ROOT / "specifications", ignore_errors=True) + Path(os.environ["OUTPUT_FILE"]).unlink(missing_ok=True) + # Tear down mog_wsgi if applicable. elif TEST_NAME == "mod_wsgi": from mod_wsgi_tester import teardown_mod_wsgi teardown_mod_wsgi() +# Tear down coverage if applicable. +if os.environ.get("COVERAGE"): + shutil.rmtree(".pytest_cache", ignore_errors=True) + LOGGER.info(f"Tearing down tests of type '{TEST_NAME}'... done.") diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index cd55410cf..535e392ea 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -50,7 +50,7 @@ TEST_SUITE_MAP = { } # Tests that require a sub test suite. -SUB_TEST_REQUIRED = ["auth_aws", "auth_oidc", "kms", "mod_wsgi"] +SUB_TEST_REQUIRED = ["auth_aws", "auth_oidc", "kms", "mod_wsgi", "perf"] EXTRA_TESTS = ["mod_wsgi"] diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index c8ecb8009..3c3eef989 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -23,7 +23,7 @@ jobs: with: persist-credentials: false - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install uv uses: astral-sh/setup-uv@v5 with: @@ -63,7 +63,7 @@ jobs: with: persist-credentials: false - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install uv uses: astral-sh/setup-uv@v5 with: @@ -86,7 +86,7 @@ jobs: with: persist-credentials: false - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install uv uses: astral-sh/setup-uv@v5 with: @@ -114,7 +114,7 @@ jobs: enable-cache: true python-version: "3.9" - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install dependencies run: just install - name: Build docs @@ -133,7 +133,7 @@ jobs: enable-cache: true python-version: "3.9" - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install dependencies run: just install - name: Build docs @@ -155,7 +155,7 @@ jobs: enable-cache: true python-version: "${{matrix.python}}" - name: Install just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Install dependencies run: | just install diff --git a/.gitignore b/.gitignore index 8c095c215..966059e69 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ expansion.yml *expansions.yml .evergreen/scripts/env.sh .evergreen/scripts/test-env.sh +specifications/ +results.json # Lambda temp files test/lambda/.aws-sam diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2a833d87..47eb01dbf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -297,6 +297,12 @@ The `mode` can be `standalone` or `embedded`. For the `replica_set` version of If you are running one of the `no-responder` tests, omit the `run-server` step. +### Perf Tests + +- Start the appropriate server, e.g. `just run-server --version=v8.0-perf --ssl`. +- Set up the tests with `sync` or `async`: `just setup-tests perf sync`. +- Run the tests: `just run-tests`. + ## Enable Debug Logs - Use `-o log_cli_level="DEBUG" -o log_cli=1` with `just test` or `pytest`. - Add `log_cli_level = "DEBUG` and `log_cli = 1` to the `tool.pytest.ini_options` section in `pyproject.toml` for Evergreen patches or to enable debug logs by default on your machine. diff --git a/doc/api/index.rst b/doc/api/index.rst index 437f2cc6a..339f5843b 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -3,7 +3,7 @@ API Documentation The PyMongo distribution contains three top-level packages for interacting with MongoDB. :mod:`bson` is an implementation of the -`BSON format `_, :mod:`pymongo` is a +`BSON format `_, :mod:`pymongo` is a full-featured driver for MongoDB, and :mod:`gridfs` is a set of tools for working with the `GridFS `_ storage diff --git a/doc/async-tutorial.rst b/doc/async-tutorial.rst index 7a3a98711..1884631ec 100644 --- a/doc/async-tutorial.rst +++ b/doc/async-tutorial.rst @@ -385,7 +385,7 @@ Indexing Adding indexes can help accelerate certain queries and can also add additional functionality to querying and storing documents. In this example, we'll demonstrate how to create a `unique index -`_ on a key that rejects +`_ on a key that rejects documents whose value for that key already exists in the index. First, we'll need to create the index: diff --git a/doc/changelog.rst b/doc/changelog.rst index 21e86953c..a54d22907 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -3067,7 +3067,7 @@ fixes. Highlights include: :class:`~gridfs.grid_file.GridOutCursor`. - Greatly improved :doc:`support for mod_wsgi ` when using PyMongo's C extensions. Read `Jesse's blog post - `_ for details. + `_ for details. - Improved C extension support for ARM little endian. Breaking changes @@ -3322,7 +3322,7 @@ Important New Features: - Support for mongos failover. - A new :meth:`~pymongo.collection.Collection.aggregate` method to support MongoDB's new `aggregation framework - `_. + `_. - Support for legacy Java and C# byte order when encoding and decoding UUIDs. - Support for connecting directly to an arbiter. @@ -3686,7 +3686,7 @@ Changes in Version 1.9 (2010/09/28) Version 1.9 adds a new package to the PyMongo distribution, :mod:`bson`. :mod:`bson` contains all of the `BSON -`_ encoding and decoding logic, and the BSON +`_ encoding and decoding logic, and the BSON types that were formerly in the :mod:`pymongo` package. The following modules have been renamed: @@ -3819,7 +3819,7 @@ Changes in Version 1.7 (2010/06/17) Version 1.7 is a recommended upgrade for all PyMongo users. The full release notes are below, and some more in depth discussion of the highlights is `here -`_. +`_. - no longer attempt to build the C extension on big-endian systems. - added :class:`~bson.min_key.MinKey` and @@ -3870,7 +3870,7 @@ The biggest change in version 1.6 is a complete re-implementation of :mod:`gridfs` with a lot of improvements over the old implementation. There are many details and examples of using the new API in `this blog post -`_. The +`_. The old API has been removed in this version, so existing code will need to be modified before upgrading to 1.6. diff --git a/doc/compatibility-policy.rst b/doc/compatibility-policy.rst index 834f86ce5..9721877d4 100644 --- a/doc/compatibility-policy.rst +++ b/doc/compatibility-policy.rst @@ -52,7 +52,7 @@ deprecated PyMongo features. .. seealso:: The Python documentation on `the warnings module`_, and `the -W command line option`_. -.. _semantic versioning: http://semver.org/ +.. _semantic versioning: https://semver.org/ .. _DeprecationWarning: https://docs.python.org/3/library/exceptions.html#DeprecationWarning diff --git a/doc/conf.py b/doc/conf.py index f82c71936..c3ee5d890 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -88,7 +88,7 @@ linkcheck_ignore = [ "https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-monitoring.md#requesting-an-immediate-check", "https://github.com/mongodb/libmongocrypt/blob/master/bindings/python/README.rst#installing-from-source", r"https://wiki.centos.org/[\w/]*", - r"http://sourceforge.net/", + r"https://sourceforge.net/", ] # -- Options for extensions ---------------------------------------------------- diff --git a/doc/examples/aggregation.rst b/doc/examples/aggregation.rst index 9b1a89fba..e7e3df6ce 100644 --- a/doc/examples/aggregation.rst +++ b/doc/examples/aggregation.rst @@ -87,4 +87,4 @@ you can add computed fields, create new virtual sub-objects, and extract sub-fields into the top-level of results. .. seealso:: The full documentation for MongoDB's `aggregation framework - `_ + `_ diff --git a/doc/examples/authentication.rst b/doc/examples/authentication.rst index a92222baf..3f1137969 100644 --- a/doc/examples/authentication.rst +++ b/doc/examples/authentication.rst @@ -191,7 +191,7 @@ Two extra ``authMechanismProperties`` are supported on Windows platforms: >>> uri = "mongodb://mongodbuser%40EXAMPLE.COM@example.com/?authMechanism=GSSAPI&authMechanismProperties=SERVICE_REALM:otherrealm" -.. _kerberos: http://pypi.python.org/pypi/kerberos +.. _kerberos: https://pypi.python.org/pypi/kerberos .. _pykerberos: https://pypi.python.org/pypi/pykerberos .. _winkerberos: https://pypi.python.org/pypi/winkerberos/ diff --git a/doc/examples/copydb.rst b/doc/examples/copydb.rst index b37677b5c..c8026ba05 100644 --- a/doc/examples/copydb.rst +++ b/doc/examples/copydb.rst @@ -67,7 +67,7 @@ Versions of PyMongo before 3.0 included a ``copy_database`` helper method, but it has been removed. .. _copyDatabase function in the mongo shell: - http://mongodb.com/docs/manual/reference/method/db.copyDatabase/ + https://mongodb.com/docs/manual/reference/method/db.copyDatabase/ .. _Copy a Database: https://www.mongodb.com/docs/database-tools/mongodump/mongodump-examples/#copy-and-clone-databases diff --git a/doc/examples/gevent.rst b/doc/examples/gevent.rst index 0ab41c1ec..f62697d19 100644 --- a/doc/examples/gevent.rst +++ b/doc/examples/gevent.rst @@ -1,7 +1,7 @@ Gevent ====== -PyMongo supports `Gevent `_. Simply call Gevent's +PyMongo supports `Gevent `_. Simply call Gevent's ``monkey.patch_all()`` before loading any other modules: .. code-block:: pycon diff --git a/doc/examples/gridfs.rst b/doc/examples/gridfs.rst index 5f40805d7..52920adbd 100644 --- a/doc/examples/gridfs.rst +++ b/doc/examples/gridfs.rst @@ -14,7 +14,7 @@ objects (e.g. files) in MongoDB. .. seealso:: The API docs for :mod:`gridfs`. .. seealso:: `This blog post - `_ + `_ for some motivation behind this API. Setup diff --git a/doc/examples/high_availability.rst b/doc/examples/high_availability.rst index 8f94aba07..80026153f 100644 --- a/doc/examples/high_availability.rst +++ b/doc/examples/high_availability.rst @@ -2,7 +2,7 @@ High Availability and PyMongo ============================= PyMongo makes it easy to write highly available applications whether -you use a `single replica set `_ +you use a `single replica set `_ or a `large sharded cluster `_. @@ -10,17 +10,17 @@ Connecting to a Replica Set --------------------------- PyMongo makes working with `replica sets -`_ easy. Here we'll launch a new +`_ easy. Here we'll launch a new replica set and show how to handle both initialization and normal connections with PyMongo. -.. seealso:: The MongoDB documentation on `replication `_. +.. seealso:: The MongoDB documentation on `replication `_. Starting a Replica Set ~~~~~~~~~~~~~~~~~~~~~~ The main `replica set documentation -`_ contains extensive information +`_ contains extensive information about setting up a new replica set or migrating an existing MongoDB setup, be sure to check that out. Here, we'll just do the bare minimum to get a three node replica set setup locally. diff --git a/doc/examples/index.rst b/doc/examples/index.rst index ac450470e..57682fa1a 100644 --- a/doc/examples/index.rst +++ b/doc/examples/index.rst @@ -6,7 +6,7 @@ of how to accomplish specific tasks with MongoDB and PyMongo. Unless otherwise noted, all examples assume that a MongoDB instance is running on the default host and port. Assuming you have `downloaded -and installed `_ +and installed `_ MongoDB, you can start it like so: .. code-block:: bash diff --git a/doc/examples/tls.rst b/doc/examples/tls.rst index 9241ac23e..ee4d75027 100644 --- a/doc/examples/tls.rst +++ b/doc/examples/tls.rst @@ -3,7 +3,7 @@ TLS/SSL and PyMongo PyMongo supports connecting to MongoDB over TLS/SSL. This guide covers the configuration options supported by PyMongo. See `the server documentation -`_ to configure +`_ to configure MongoDB. .. warning:: Industry best practices recommend, and some regulations require, diff --git a/doc/faq.rst b/doc/faq.rst index 73d0ec896..7656481d8 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -53,9 +53,9 @@ a non `async-signal-safe`_ function. For examples of deadlocks or crashes that could occur see `PYTHON-3406`_. For a long but interesting read about the problems of Python locks in -multithreaded contexts with ``fork()``, see http://bugs.python.org/issue6721. +multithreaded contexts with ``fork()``, see https://bugs.python.org/issue6721. -.. _not fork-safe: http://bugs.python.org/issue6721 +.. _not fork-safe: https://bugs.python.org/issue6721 .. _OpenSSL: https://github.com/openssl/openssl/issues/19066 .. _fork(): https://man7.org/linux/man-pages/man2/fork.2.html .. _signal-safety(7): https://man7.org/linux/man-pages/man7/signal-safety.7.html @@ -174,10 +174,10 @@ Does PyMongo support asynchronous frameworks like Gevent, asyncio, Tornado, or T PyMongo fully supports :doc:`Gevent `. To use MongoDB with `asyncio `_ -or `Tornado `_, see the +or `Tornado `_, see the `Motor `_ project. -For `Twisted `_, see `TxMongo +For `Twisted `_, see `TxMongo `_. Its stated mission is to keep feature parity with PyMongo. @@ -381,7 +381,7 @@ Can you add attribute style access for documents? ------------------------------------------------- This request has come up a number of times but we've decided not to implement anything like this. The relevant `jira case -`_ has some information +`_ has some information about the decision, but here is a brief summary: 1. This will pollute the attribute namespace for documents, so could @@ -451,7 +451,7 @@ in Flask_ (other web frameworks are similar):: How can I use PyMongo from Django? ---------------------------------- -`Django `_ is a popular Python web +`Django `_ is a popular Python web framework. Django includes an ORM, :mod:`django.db`. Currently, there's no official MongoDB backend for Django. @@ -468,7 +468,7 @@ using just MongoDB, but most of what Django provides can still be used. One project which should make working with MongoDB and Django easier -is `mango `_. Mango is a set of +is `mango `_. Mango is a set of MongoDB backends for Django sessions and authentication (bypassing :mod:`django.db` entirely). diff --git a/doc/index.rst b/doc/index.rst index 079738314..c7616ca79 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -9,7 +9,7 @@ PyMongo |release| Documentation Overview -------- **PyMongo** is a Python distribution containing tools for working with -`MongoDB `_, and is the recommended way to +`MongoDB `_, and is the recommended way to work with MongoDB from Python. This documentation attempts to explain everything you need to know to use **PyMongo**. @@ -81,7 +81,7 @@ Issues ------ All issues should be reported (and can be tracked / voted for / commented on) at the main `MongoDB JIRA bug tracker -`_, in the "Python Driver" +`_, in the "Python Driver" project. Feature Requests / Feedback @@ -94,7 +94,7 @@ Contributing **PyMongo** has a large :doc:`community ` and contributions are always encouraged. Contributions can be as simple as minor tweaks to this documentation. To contribute, fork the project on -`GitHub `_ and send a +`GitHub `_ and send a pull request. Changes diff --git a/doc/installation.rst b/doc/installation.rst index abda06db1..837cbf4d9 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -3,7 +3,7 @@ Installing / Upgrading .. highlight:: bash **PyMongo** is in the `Python Package Index -`_. +`_. .. warning:: **Do not install the "bson" package from pypi.** PyMongo comes with its own bson package; doing "pip install bson" @@ -12,7 +12,7 @@ Installing / Upgrading Installing with pip ------------------- -We recommend using `pip `_ +We recommend using `pip `_ to install pymongo on all platforms:: $ python3 -m pip install pymongo @@ -136,7 +136,7 @@ is a workaround:: # For some Python builds from python.org $ env ARCHFLAGS='-arch i386 -arch x86_64' python -m pip install pymongo -See `http://bugs.python.org/issue11623 `_ +See `https://bugs.python.org/issue11623 `_ for a more detailed explanation. **Lion (10.7) and newer** - PyMongo's C extensions can be built against diff --git a/doc/make.bat b/doc/make.bat index 2119f5109..aa1adb91a 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -21,7 +21,7 @@ if errorlevel 9009 ( echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ + echo.https://sphinx-doc.org/ exit /b 1 ) diff --git a/doc/tools.rst b/doc/tools.rst index 7ec3ddb44..a3f167d02 100644 --- a/doc/tools.rst +++ b/doc/tools.rst @@ -31,7 +31,7 @@ MongoEngine layer on top of PyMongo. It allows you to define schemas for documents and query collections using syntax inspired by the Django ORM. The code is available on `GitHub - `_; for more information, see + `_; for more information, see the `tutorial `_. MincePy @@ -47,17 +47,15 @@ Ming `Ming `_ is a library that allows you to enforce schemas on a MongoDB database in your Python application. It was developed by `SourceForge - `_ in the course of their migration to - MongoDB. See the `introductory blog post - `_ - for more details. + `_ in the course of their migration to + MongoDB. MotorEngine `MotorEngine `_ is a port of MongoEngine to Motor, for asynchronous access with Tornado. It implements the same modeling APIs to be data-portable, meaning that a model defined in MongoEngine can be read in MotorEngine. The source is - `available on GitHub `_. + `available on GitHub `_. uMongo `uMongo `_ is a Python MongoDB ODM. @@ -89,12 +87,12 @@ PyMODM `_. MongoKit - The `MongoKit `_ framework + The `MongoKit `_ framework is an ORM-like layer on top of PyMongo. There is also a MongoKit - `google group `_. + `google group `_. Minimongo - `minimongo `_ is a lightweight, + `minimongo `_ is a lightweight, pythonic interface to MongoDB. It retains pymongo's query and update API, and provides a number of additional features, including a simple document-oriented interface, connection pooling, index management, and @@ -102,15 +100,15 @@ Minimongo `_. Manga - `Manga `_ aims to be a simpler ORM-like + `Manga `_ aims to be a simpler ORM-like layer on top of PyMongo. The syntax for defining schema is inspired by the Django ORM, but Pymongo's query language is maintained. The source `is on - GitHub `_. + GitHub `_. Humongolus `Humongolus `_ is a lightweight ORM framework for Python and MongoDB. The name comes from the combination of - MongoDB and `Homunculus `_ (the + MongoDB and `Homunculus `_ (the concept of a miniature though fully formed human body). Humongolus allows you to create models/schemas with robust validation. It attempts to be as pythonic as possible and exposes the pymongo cursor objects whenever @@ -133,30 +131,30 @@ various Python frameworks and libraries. database backend for Django that completely integrates with its ORM. For more information `see the tutorial `_. -* `mango `_ provides MongoDB backends for +* `mango `_ provides MongoDB backends for Django sessions and authentication (bypassing :mod:`django.db` entirely). * `Django MongoEngine `_ is a MongoDB backend for Django, an `example: `_. For more information see ``_ -* `mongodb_beaker `_ is a +* `mongodb_beaker `_ is a project to enable using MongoDB as a backend for `beakers `_ caching / session system. - `The source is on GitHub `_. + `The source is on GitHub `_. * `Log4Mongo `_ is a flexible Python logging handler that can store logs in MongoDB using normal and capped collections. -* `MongoLog `_ is a Python logging +* `MongoLog `_ is a Python logging handler that stores logs in MongoDB using a capped collection. -* `rod.recipe.mongodb `_ is a +* `rod.recipe.mongodb `_ is a ZC Buildout recipe for downloading and installing MongoDB. -* `mongobox `_ is a tool to run a sandboxed +* `mongobox `_ is a tool to run a sandboxed MongoDB instance from within a python app. -* `Flask-MongoAlchemy `_ Add +* `Flask-MongoAlchemy `_ Add Flask support for MongoDB using MongoAlchemy. -* `Flask-MongoKit `_ Flask extension +* `Flask-MongoKit `_ Flask extension to better integrate MongoKit into Flask. -* `Flask-PyMongo `_ Flask-PyMongo +* `Flask-PyMongo `_ Flask-PyMongo bridges Flask and PyMongo. Alternative Drivers diff --git a/doc/tutorial.rst b/doc/tutorial.rst index e33936363..46bde3035 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -375,7 +375,7 @@ Indexing Adding indexes can help accelerate certain queries and can also add additional functionality to querying and storing documents. In this example, we'll demonstrate how to create a `unique index -`_ on a key that rejects +`_ on a key that rejects documents whose value for that key already exists in the index. First, we'll need to create the index: diff --git a/pymongo/__init__.py b/pymongo/__init__.py index 8d6def160..e39250891 100644 --- a/pymongo/__init__.py +++ b/pymongo/__init__.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -55,7 +55,7 @@ DESCENDING = -1 GEO2D = "2d" """Index specifier for a 2-dimensional `geospatial index`_. -.. _geospatial index: http://mongodb.com/docs/manual/core/2d/ +.. _geospatial index: https://mongodb.com/docs/manual/core/2d/ """ GEOSPHERE = "2dsphere" @@ -63,7 +63,7 @@ GEOSPHERE = "2dsphere" .. versionadded:: 2.5 -.. _spherical geospatial index: http://mongodb.com/docs/manual/core/2dsphere/ +.. _spherical geospatial index: https://mongodb.com/docs/manual/core/2dsphere/ """ HASHED = "hashed" @@ -71,7 +71,7 @@ HASHED = "hashed" .. versionadded:: 2.5 -.. _hashed index: http://mongodb.com/docs/manual/core/index-hashed/ +.. _hashed index: https://mongodb.com/docs/manual/core/index-hashed/ """ TEXT = "text" @@ -83,7 +83,7 @@ TEXT = "text" .. versionadded:: 2.7.1 -.. _text index: http://mongodb.com/docs/manual/core/index-text/ +.. _text index: https://mongodb.com/docs/manual/core/index-text/ """ from pymongo import _csot diff --git a/pymongo/_asyncio_task.py b/pymongo/_asyncio_task.py index 8e457763d..7a528f027 100644 --- a/pymongo/_asyncio_task.py +++ b/pymongo/_asyncio_task.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/_azure_helpers.py b/pymongo/_azure_helpers.py index 6e86ab567..8a7af0b40 100644 --- a/pymongo/_azure_helpers.py +++ b/pymongo/_azure_helpers.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/_client_bulk_shared.py b/pymongo/_client_bulk_shared.py index 649f1c6aa..581402556 100644 --- a/pymongo/_client_bulk_shared.py +++ b/pymongo/_client_bulk_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/_cmessagemodule.c b/pymongo/_cmessagemodule.c index eb457b341..a50686373 100644 --- a/pymongo/_cmessagemodule.c +++ b/pymongo/_cmessagemodule.c @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/pymongo/_gcp_helpers.py b/pymongo/_gcp_helpers.py index d90f3cc21..7979d1e80 100644 --- a/pymongo/_gcp_helpers.py +++ b/pymongo/_gcp_helpers.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/_version.py b/pymongo/_version.py index f7a1f3dcb..985acfd81 100644 --- a/pymongo/_version.py +++ b/pymongo/_version.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/aggregation.py b/pymongo/asynchronous/aggregation.py index 768415189..daccd1bcb 100644 --- a/pymongo/asynchronous/aggregation.py +++ b/pymongo/asynchronous/aggregation.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/auth.py b/pymongo/asynchronous/auth.py index 8cc4edf19..c1321f1d9 100644 --- a/pymongo/asynchronous/auth.py +++ b/pymongo/asynchronous/auth.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/auth_aws.py b/pymongo/asynchronous/auth_aws.py index 9dcc625d1..210d30604 100644 --- a/pymongo/asynchronous/auth_aws.py +++ b/pymongo/asynchronous/auth_aws.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/auth_oidc.py b/pymongo/asynchronous/auth_oidc.py index 38346648c..217c8104a 100644 --- a/pymongo/asynchronous/auth_oidc.py +++ b/pymongo/asynchronous/auth_oidc.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/bulk.py b/pymongo/asynchronous/bulk.py index 6770d7b34..1ea6fd60d 100644 --- a/pymongo/asynchronous/bulk.py +++ b/pymongo/asynchronous/bulk.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/change_stream.py b/pymongo/asynchronous/change_stream.py index f405e9116..6c37f9d05 100644 --- a/pymongo/asynchronous/change_stream.py +++ b/pymongo/asynchronous/change_stream.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/client_bulk.py b/pymongo/asynchronous/client_bulk.py index 45824256d..110052755 100644 --- a/pymongo/asynchronous/client_bulk.py +++ b/pymongo/asynchronous/client_bulk.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/client_session.py b/pymongo/asynchronous/client_session.py index e9548b0ec..98dd6a470 100644 --- a/pymongo/asynchronous/client_session.py +++ b/pymongo/asynchronous/client_session.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/collection.py b/pymongo/asynchronous/collection.py index e83a39143..aef3539e8 100644 --- a/pymongo/asynchronous/collection.py +++ b/pymongo/asynchronous/collection.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/database.py b/pymongo/asynchronous/database.py index 4aba9ab0e..d0089eb4e 100644 --- a/pymongo/asynchronous/database.py +++ b/pymongo/asynchronous/database.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/encryption.py b/pymongo/asynchronous/encryption.py index ef8d817b2..b18ed53f9 100644 --- a/pymongo/asynchronous/encryption.py +++ b/pymongo/asynchronous/encryption.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/helpers.py b/pymongo/asynchronous/helpers.py index d519e8749..88b710345 100644 --- a/pymongo/asynchronous/helpers.py +++ b/pymongo/asynchronous/helpers.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index eefafd5fd..ecd57a188 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -192,7 +192,7 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]): execute. The `host` parameter can be a full `mongodb URI - `_, in addition to + `_, in addition to a simple hostname. It can also be a list of hostnames but no more than one URI. Any port specified in the host string(s) will override the `port` parameter. For username and diff --git a/pymongo/asynchronous/monitor.py b/pymongo/asynchronous/monitor.py index d7f87b718..5cb42f4d4 100644 --- a/pymongo/asynchronous/monitor.py +++ b/pymongo/asynchronous/monitor.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/network.py b/pymongo/asynchronous/network.py index c7a5580ec..e529a52ee 100644 --- a/pymongo/asynchronous/network.py +++ b/pymongo/asynchronous/network.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/pool.py b/pymongo/asynchronous/pool.py index 698558aa5..d06c528e7 100644 --- a/pymongo/asynchronous/pool.py +++ b/pymongo/asynchronous/pool.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -964,7 +964,7 @@ class PoolState: # Do *not* explicitly inherit from object or Jython won't call __del__ -# http://bugs.jython.org/issue1057 +# https://bugs.jython.org/issue1057 class Pool: def __init__( self, diff --git a/pymongo/asynchronous/server.py b/pymongo/asynchronous/server.py index 72f22584e..3ad8374b0 100644 --- a/pymongo/asynchronous/server.py +++ b/pymongo/asynchronous/server.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/settings.py b/pymongo/asynchronous/settings.py index 1103e1bd1..62be853fb 100644 --- a/pymongo/asynchronous/settings.py +++ b/pymongo/asynchronous/settings.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/asynchronous/topology.py b/pymongo/asynchronous/topology.py index f00f62ffe..d83ceca55 100644 --- a/pymongo/asynchronous/topology.py +++ b/pymongo/asynchronous/topology.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/auth.py b/pymongo/auth.py index a65113841..a36f3f423 100644 --- a/pymongo/auth.py +++ b/pymongo/auth.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/auth_oidc.py b/pymongo/auth_oidc.py index 4ac266de5..61764b811 100644 --- a/pymongo/auth_oidc.py +++ b/pymongo/auth_oidc.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/auth_oidc_shared.py b/pymongo/auth_oidc_shared.py index 9e0acaf6c..d33397f52 100644 --- a/pymongo/auth_oidc_shared.py +++ b/pymongo/auth_oidc_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/auth_shared.py b/pymongo/auth_shared.py index 410521d73..5a9a2b673 100644 --- a/pymongo/auth_shared.py +++ b/pymongo/auth_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/bulk_shared.py b/pymongo/bulk_shared.py index 7aa6340d5..9276419d8 100644 --- a/pymongo/bulk_shared.py +++ b/pymongo/bulk_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/change_stream.py b/pymongo/change_stream.py index b96a1750c..f9abddec4 100644 --- a/pymongo/change_stream.py +++ b/pymongo/change_stream.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/client_options.py b/pymongo/client_options.py index 9b9b88a73..a66e87c9f 100644 --- a/pymongo/client_options.py +++ b/pymongo/client_options.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/client_session.py b/pymongo/client_session.py index 1a3af44e1..db72b0b2e 100644 --- a/pymongo/client_session.py +++ b/pymongo/client_session.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/collation.py b/pymongo/collation.py index fc84b937f..8a1eca7af 100644 --- a/pymongo/collation.py +++ b/pymongo/collation.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/collection.py b/pymongo/collection.py index f726ed037..16063425a 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/common.py b/pymongo/common.py index 4be7a3122..3d8095eed 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -160,7 +160,7 @@ def clean_node(node: str) -> tuple[str, int]: host, port = partition_node(node) # Normalize hostname to lowercase, since DNS is case-insensitive: - # http://tools.ietf.org/html/rfc4343 + # https://tools.ietf.org/html/rfc4343 # This prevents useless rediscovery if "foo.com" is in the seed list but # "FOO.com" is in the hello response. return host.lower(), port diff --git a/pymongo/compression_support.py b/pymongo/compression_support.py index 748645173..db14b8d83 100644 --- a/pymongo/compression_support.py +++ b/pymongo/compression_support.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/daemon.py b/pymongo/daemon.py index b40384df1..be976decd 100644 --- a/pymongo/daemon.py +++ b/pymongo/daemon.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/database.py b/pymongo/database.py index bbd05702d..f85b312f9 100644 --- a/pymongo/database.py +++ b/pymongo/database.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/database_shared.py b/pymongo/database_shared.py index 2d4e37fee..d6563a4b3 100644 --- a/pymongo/database_shared.py +++ b/pymongo/database_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/driver_info.py b/pymongo/driver_info.py index 724a6f20d..f24321d97 100644 --- a/pymongo/driver_info.py +++ b/pymongo/driver_info.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/encryption.py b/pymongo/encryption.py index 5bc2a7590..71c1d4b72 100644 --- a/pymongo/encryption.py +++ b/pymongo/encryption.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/encryption_options.py b/pymongo/encryption_options.py index a1c40dc7b..02fcc98e4 100644 --- a/pymongo/encryption_options.py +++ b/pymongo/encryption_options.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/errors.py b/pymongo/errors.py index 2cd1081e3..794b5a939 100644 --- a/pymongo/errors.py +++ b/pymongo/errors.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/event_loggers.py b/pymongo/event_loggers.py index 86b53c637..80acaa10c 100644 --- a/pymongo/event_loggers.py +++ b/pymongo/event_loggers.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/hello.py b/pymongo/hello.py index c30b825e1..1eb40ed92 100644 --- a/pymongo/hello.py +++ b/pymongo/hello.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/helpers_shared.py b/pymongo/helpers_shared.py index c6b820c1c..a664e87a6 100644 --- a/pymongo/helpers_shared.py +++ b/pymongo/helpers_shared.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/lock.py b/pymongo/lock.py index 6bf713801..ad990fce3 100644 --- a/pymongo/lock.py +++ b/pymongo/lock.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/logger.py b/pymongo/logger.py index 9079dc3f3..1b3fe43b8 100644 --- a/pymongo/logger.py +++ b/pymongo/logger.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/max_staleness_selectors.py b/pymongo/max_staleness_selectors.py index 89bfa6528..5f1e40472 100644 --- a/pymongo/max_staleness_selectors.py +++ b/pymongo/max_staleness_selectors.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/message.py b/pymongo/message.py index 8e2fd6f99..d51c77a17 100644 --- a/pymongo/message.py +++ b/pymongo/message.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index a815cbc8a..778abe27e 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/monitoring.py b/pymongo/monitoring.py index 38d6e3a22..101a8fbc3 100644 --- a/pymongo/monitoring.py +++ b/pymongo/monitoring.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/network_layer.py b/pymongo/network_layer.py index 11c66bf16..4512aba59 100644 --- a/pymongo/network_layer.py +++ b/pymongo/network_layer.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/ocsp_cache.py b/pymongo/ocsp_cache.py index 3facefe35..2df232848 100644 --- a/pymongo/ocsp_cache.py +++ b/pymongo/ocsp_cache.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/ocsp_support.py b/pymongo/ocsp_support.py index ee359b71c..8322f821f 100644 --- a/pymongo/ocsp_support.py +++ b/pymongo/ocsp_support.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/operations.py b/pymongo/operations.py index 482ab6800..300f1ba12 100644 --- a/pymongo/operations.py +++ b/pymongo/operations.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/periodic_executor.py b/pymongo/periodic_executor.py index 5f54b243e..323debdce 100644 --- a/pymongo/periodic_executor.py +++ b/pymongo/periodic_executor.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/pool.py b/pymongo/pool.py index fbbb70fc6..456ff3df0 100644 --- a/pymongo/pool.py +++ b/pymongo/pool.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/pool_options.py b/pymongo/pool_options.py index 038dbb3b5..a2e309cc5 100644 --- a/pymongo/pool_options.py +++ b/pymongo/pool_options.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/pyopenssl_context.py b/pymongo/pyopenssl_context.py index 8c643394b..0cc35c4f6 100644 --- a/pymongo/pyopenssl_context.py +++ b/pymongo/pyopenssl_context.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/read_concern.py b/pymongo/read_concern.py index 17f3a46ed..2adc40336 100644 --- a/pymongo/read_concern.py +++ b/pymongo/read_concern.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/read_preferences.py b/pymongo/read_preferences.py index 8c6e6de45..581f7ca66 100644 --- a/pymongo/read_preferences.py +++ b/pymongo/read_preferences.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/response.py b/pymongo/response.py index e47749423..211ddf235 100644 --- a/pymongo/response.py +++ b/pymongo/response.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/results.py b/pymongo/results.py index d17ff1c3e..bcce121fe 100644 --- a/pymongo/results.py +++ b/pymongo/results.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/saslprep.py b/pymongo/saslprep.py index 7fb546f61..9cef22419 100644 --- a/pymongo/saslprep.py +++ b/pymongo/saslprep.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/server_api.py b/pymongo/server_api.py index 4a746008c..40bb1aac3 100644 --- a/pymongo/server_api.py +++ b/pymongo/server_api.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/server_description.py b/pymongo/server_description.py index 064ad4337..afc5346bb 100644 --- a/pymongo/server_description.py +++ b/pymongo/server_description.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/server_selectors.py b/pymongo/server_selectors.py index c22ad599e..0d1425ab3 100644 --- a/pymongo/server_selectors.py +++ b/pymongo/server_selectors.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/server_type.py b/pymongo/server_type.py index 937855cc7..7a6d2aaf1 100644 --- a/pymongo/server_type.py +++ b/pymongo/server_type.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/ssl_context.py b/pymongo/ssl_context.py index ee32145c0..2ff7428ca 100644 --- a/pymongo/ssl_context.py +++ b/pymongo/ssl_context.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/ssl_support.py b/pymongo/ssl_support.py index 0faf21ba8..2e6a509e3 100644 --- a/pymongo/ssl_support.py +++ b/pymongo/ssl_support.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/aggregation.py b/pymongo/synchronous/aggregation.py index 7c7e6252f..3eb0c8bf5 100644 --- a/pymongo/synchronous/aggregation.py +++ b/pymongo/synchronous/aggregation.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/auth.py b/pymongo/synchronous/auth.py index 6041ebdbe..650e25234 100644 --- a/pymongo/synchronous/auth.py +++ b/pymongo/synchronous/auth.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/auth_aws.py b/pymongo/synchronous/auth_aws.py index 7c0d24f3a..c7ea47886 100644 --- a/pymongo/synchronous/auth_aws.py +++ b/pymongo/synchronous/auth_aws.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/auth_oidc.py b/pymongo/synchronous/auth_oidc.py index c5efdd5fc..8a8703c14 100644 --- a/pymongo/synchronous/auth_oidc.py +++ b/pymongo/synchronous/auth_oidc.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/bulk.py b/pymongo/synchronous/bulk.py index 0b709f1ac..f54dcdd42 100644 --- a/pymongo/synchronous/bulk.py +++ b/pymongo/synchronous/bulk.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/change_stream.py b/pymongo/synchronous/change_stream.py index 43aab39ee..304427b89 100644 --- a/pymongo/synchronous/change_stream.py +++ b/pymongo/synchronous/change_stream.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/client_bulk.py b/pymongo/synchronous/client_bulk.py index 9f6e3f7cf..e6de22d23 100644 --- a/pymongo/synchronous/client_bulk.py +++ b/pymongo/synchronous/client_bulk.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/client_session.py b/pymongo/synchronous/client_session.py index af7ff59b3..60c15a9ec 100644 --- a/pymongo/synchronous/client_session.py +++ b/pymongo/synchronous/client_session.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/collection.py b/pymongo/synchronous/collection.py index b956ac58a..fe869a622 100644 --- a/pymongo/synchronous/collection.py +++ b/pymongo/synchronous/collection.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/database.py b/pymongo/synchronous/database.py index 0dc03cb74..a11674b9a 100644 --- a/pymongo/synchronous/database.py +++ b/pymongo/synchronous/database.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/encryption.py b/pymongo/synchronous/encryption.py index a97534ed4..724131fa9 100644 --- a/pymongo/synchronous/encryption.py +++ b/pymongo/synchronous/encryption.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/helpers.py b/pymongo/synchronous/helpers.py index f800e7dcc..bc69a49e8 100644 --- a/pymongo/synchronous/helpers.py +++ b/pymongo/synchronous/helpers.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index b10163606..79b6cf6ed 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -187,7 +187,7 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]): execute. The `host` parameter can be a full `mongodb URI - `_, in addition to + `_, in addition to a simple hostname. It can also be a list of hostnames but no more than one URI. Any port specified in the host string(s) will override the `port` parameter. For username and diff --git a/pymongo/synchronous/monitor.py b/pymongo/synchronous/monitor.py index c39a57c39..5b45ed9a4 100644 --- a/pymongo/synchronous/monitor.py +++ b/pymongo/synchronous/monitor.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/network.py b/pymongo/synchronous/network.py index 543b069bf..0e53e806b 100644 --- a/pymongo/synchronous/network.py +++ b/pymongo/synchronous/network.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/pool.py b/pymongo/synchronous/pool.py index e575710ff..cd78e26fe 100644 --- a/pymongo/synchronous/pool.py +++ b/pymongo/synchronous/pool.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -960,7 +960,7 @@ class PoolState: # Do *not* explicitly inherit from object or Jython won't call __del__ -# http://bugs.jython.org/issue1057 +# https://bugs.jython.org/issue1057 class Pool: def __init__( self, diff --git a/pymongo/synchronous/server.py b/pymongo/synchronous/server.py index ed48cc6cc..5b8a8e391 100644 --- a/pymongo/synchronous/server.py +++ b/pymongo/synchronous/server.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/settings.py b/pymongo/synchronous/settings.py index 040776713..bb17de187 100644 --- a/pymongo/synchronous/settings.py +++ b/pymongo/synchronous/settings.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/synchronous/topology.py b/pymongo/synchronous/topology.py index 0af793a96..bf9011830 100644 --- a/pymongo/synchronous/topology.py +++ b/pymongo/synchronous/topology.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/topology_description.py b/pymongo/topology_description.py index 742bbf8c6..29293b231 100644 --- a/pymongo/topology_description.py +++ b/pymongo/topology_description.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/typings.py b/pymongo/typings.py index 68962eb54..ce6f369d1 100644 --- a/pymongo/typings.py +++ b/pymongo/typings.py @@ -4,7 +4,7 @@ # 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 +# https://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, diff --git a/pymongo/uri_parser.py b/pymongo/uri_parser.py index 8f56ae409..ee7ca9c20 100644 --- a/pymongo/uri_parser.py +++ b/pymongo/uri_parser.py @@ -4,7 +4,7 @@ # 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 +# https://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, @@ -164,7 +164,7 @@ def parse_host(entity: str, default_port: Optional[int] = DEFAULT_PORT) -> _Addr port = int(port) # Normalize hostname to lowercase, since DNS is case-insensitive: - # http://tools.ietf.org/html/rfc4343 + # https://tools.ietf.org/html/rfc4343 # This prevents useless rediscovery if "foo.com" is in the seed list but # "FOO.com" is in the hello response. return host.lower(), port diff --git a/pymongo/write_concern.py b/pymongo/write_concern.py index 21faeebed..ff31c6730 100644 --- a/pymongo/write_concern.py +++ b/pymongo/write_concern.py @@ -4,7 +4,7 @@ # 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 +# https://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,