.. warning:: PyMongo 4.2 drops support for Python 3.6: Python 3.7+ is now required.
PyMongo 4.2 brings a number of improvements including:
Support for MongoDB 6.0.
Support for the Queryable Encryption beta with MongoDB 6.0. Note that backwards-breaking
changes may be made before the final release. See :ref:automatic-queryable-client-side-encryption for example usage.
Provisional (beta) support for :func:pymongo.timeout to apply a single timeout
to an entire block of pymongo operations.
Added the timeoutMS URI and keyword argument to :class:~pymongo.mongo_client.MongoClient.
Added the :attr:pymongo.errors.PyMongoError.timeout property which is True when
the error was caused by a timeout.
Added the check_exists argument to :meth:~pymongo.database.Database.create_collection
that when True (the default) runs an additional listCollections command to verify that the
collection does not exist already.
Added the following key management APIs to :class:~pymongo.encryption.ClientEncryption:
Support for the crypt_shared library to replace mongocryptd using the new
crypt_shared_lib_path and crypt_shared_lib_required arguments to
:class:~pymongo.encryption_options.AutoEncryptionOpts.
Bug fixes
.........
Fixed a bug where :meth:~pymongo.collection.Collection.estimated_document_count
would fail with a "CommandNotSupportedOnView" error on views (PYTHON-2885_).
Fixed a bug where invalid UTF-8 strings could be passed as patterns for :class:~bson.regex.Regex
objects. :func:bson.encode now correctly raises :class:bson.errors.InvalidStringData (PYTHON-3048_).
Fixed a bug that caused AutoReconnect("connection pool paused") errors in the child
process after fork (PYTHON-3257_).
Fixed a bug where :meth:~pymongo.collection.Collection.count_documents and
:meth:~pymongo.collection.Collection.distinct would fail in a transaction with
directConnection=True (PYTHON-3333_).
GridFS no longer uploads an incomplete files collection document after encountering an
error in the middle of an upload fork. This results in fewer
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps pymongo from 3.11.4 to 4.2.0.
Release notes
Sourced from pymongo's releases.
Changelog
Sourced from pymongo's changelog.
... (truncated)
Commits
9bc134c
BUMP 4.2 (#1016)6172c00
PYTHON-3362 Fix CSOT gridfs test (#1015)4d4fdda
PYTHON-3363 Allow change stream to be resumed after a timeout (#1014)935f926
PYTHON-3362 Ignore wtimeout when timeoutMS or timeout() is configured (#1013)db3f2dc
PYTHON-2459 Implement unified GridFS tests (#1012)6670461
PYTHON-3289 Apply client timeoutMS to every operation (#1011)5c38676
PYTHON-3359 Remove Database and Collection timeout override (#1009)c434861
PYTHON-3291 Add PyMongoError.timeout to identify timeout related errors (#1008)484374e
PYTHON-3298 Add flag to create_collection to skip listCollections pre-check (...bbe364f
PYTHON-3294 Bump minimum pymongocrypt version to 1.3.0 (#1007)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)