.. warning:: PyMongo 4.1 drops support for Python 3.6.0 and 3.6.1, Python 3.6.2+ is now required.
PyMongo 4.1 brings a number of improvements including:
Type Hinting support (formerly provided by pymongo-stubs_). See :doc:examples/type_hints for more information.
Added support for the comment parameter to all helpers. For example see
:meth:~pymongo.collection.Collection.insert_one.
Added support for the let parameter to
:meth:~pymongo.collection.Collection.update_one,
:meth:~pymongo.collection.Collection.update_many,
:meth:~pymongo.collection.Collection.delete_one,
:meth:~pymongo.collection.Collection.delete_many,
:meth:~pymongo.collection.Collection.replace_one,
:meth:~pymongo.collection.Collection.aggregate,
:meth:~pymongo.collection.Collection.find_one_and_delete,
:meth:~pymongo.collection.Collection.find_one_and_replace,
:meth:~pymongo.collection.Collection.find_one_and_update,
:meth:~pymongo.collection.Collection.find,
:meth:~pymongo.collection.Collection.find_one,
and :meth:~pymongo.collection.Collection.bulk_write.
let is a map of parameter names and values.
Parameters can then be accessed as variables in an aggregate expression
context.
:meth:~pymongo.collection.Collection.aggregate now supports
$merge and $out executing on secondaries on MongoDB >=5.0.
aggregate() now always obeys the collection's :attr:read_preference on
MongoDB >= 5.0.
:meth:gridfs.grid_file.GridOut.seek now returns the new position in the file, to
conform to the behavior of :meth:io.IOBase.seek.
Improved reuse of implicit sessions (PYTHON-2956_).
Bug fixes
.........
Fixed bug that would cause SDAM heartbeat timeouts and connection churn on
AWS Lambda and other FaaS environments (PYTHON-3186_).
Fixed bug where :class:~pymongo.mongo_client.MongoClient,
:class:~pymongo.database.Database, and :class:~pymongo.collection.Collection
mistakenly implemented :class:typing.Iterable (PYTHON-3084_).
Issues Resolved
...............
See the PyMongo 4.1 release notes in JIRA_ for the list of resolved issues
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.12.0 to 4.1.0.
Release notes
Sourced from pymongo's releases.
Changelog
Sourced from pymongo's changelog.
... (truncated)
Commits
6e99bf4
BUMP 4.1.0b0fd5cb
Improve docstrings for SON parameters (#919)a809b3c
PYTHON-3190 Test Failure - doctests failing cannot import name 'TypedDict' (#...1d6914f
PYTHON-3191 Fix test_sigstop_sigcont with Versioned API (#916)113d66d
PYTHON-2406 Clean up of tools documentation page (#913)484058e
PYTHON-3160 Fix MMAPv1 tests (#914)3179eab
Improve the changelog for 4.1 (#915)c58950a
PYTHON-3186 Avoid SDAM heartbeat timeouts on AWS Lambda (#912)1d30802
PYTHON-3074 Add documentation for type hints (#906)a4bba9d
Revert "PYTHON-2970 Prioritize electionId over setVersion for stale primary c...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)