Changelog 4.3 (#1038)
This commit is contained in:
parent
cfc99c82f3
commit
09aeef0f9d
@ -1,6 +1,39 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
Changes in Version 4.3
|
||||
----------------------
|
||||
|
||||
PyMongo 4.3 brings a number of improvements including:
|
||||
|
||||
- Added support for decoding BSON datetimes outside of the range supported
|
||||
by Python's :class:`~datetime.datetime` builtin. See
|
||||
:ref:`handling-out-of-range-datetimes` for examples, as well as
|
||||
:class:`bson.datetime_ms.DatetimeMS`,
|
||||
:class:`bson.codec_options.DatetimeConversion`, and
|
||||
:class:`bson.codec_options.CodecOptions`'s ``datetime_conversion``
|
||||
parameter for more details (`PYTHON-1824`_).
|
||||
- Added support for using a :class:`~pymongo.mongo_client.MongoClient` after
|
||||
an :py:func:`os.fork` (`PYTHON-2484`_).
|
||||
|
||||
Bug fixes
|
||||
.........
|
||||
|
||||
- Fixed a bug where :class:`~pymongo.change_stream.ChangeStream`
|
||||
would allow an app to retry calling ``next()`` or ``try_next()`` even
|
||||
after non-resumable errors (`PYTHON-3389`_).
|
||||
|
||||
Issues Resolved
|
||||
...............
|
||||
|
||||
See the `PyMongo 4.3 release notes in JIRA`_ for the list of resolved issues
|
||||
in this release.
|
||||
|
||||
.. _PYTHON-1824: https://jira.mongodb.org/browse/PYTHON-1824
|
||||
.. _PYTHON-2484: https://jira.mongodb.org/browse/PYTHON-2484
|
||||
.. _PYTHON-3389: https://jira.mongodb.org/browse/PYTHON-3389
|
||||
.. _PyMongo 4.3 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=33425
|
||||
|
||||
Changes in Version 4.2
|
||||
----------------------
|
||||
|
||||
|
||||
24
doc/faq.rst
24
doc/faq.rst
@ -14,15 +14,21 @@ for threaded applications.
|
||||
Is PyMongo fork-safe?
|
||||
---------------------
|
||||
|
||||
PyMongo is not fork-safe. Care must be taken when using instances of
|
||||
:class:`~pymongo.mongo_client.MongoClient` with ``fork()``. Specifically,
|
||||
instances of MongoClient must not be copied from a parent process to
|
||||
a child process. Instead, the parent process and each child process must
|
||||
create their own instances of MongoClient. Instances of MongoClient copied from
|
||||
the parent process have a high probability of deadlock in the child process due
|
||||
to the inherent incompatibilities between ``fork()``, threads, and locks
|
||||
described :ref:`below <pymongo-fork-safe-details>`. PyMongo will attempt to
|
||||
issue a warning if there is a chance of this deadlock occurring.
|
||||
Starting in PyMongo 4.3, forking on a compatible Python interpreter while
|
||||
using a client will result in all locks held by :class:`~bson.objectid
|
||||
.ObjectId` and :class:`~pymongo.mongo_client.MongoClient` being released in
|
||||
the child, as well as state shared between child and parent processes being
|
||||
reset.
|
||||
|
||||
If greenlet has been imported (usually with a library like gevent or
|
||||
Eventlet), care must be taken when using instances of :class:`~pymongo
|
||||
.mongo_client.MongoClient` with ``fork()``. Specifically, instances of
|
||||
MongoClient must not be copied from a parent process to a child process.
|
||||
Instead, the parent process and each child process must create their own
|
||||
instances of MongoClient. Instances of MongoClient copied from the parent
|
||||
process have a high probability of deadlock in the child process due to the
|
||||
inherent incompatibilities between ``fork()``, threads, and locks described
|
||||
:ref:`below<pymongo-fork-safe-details>`.
|
||||
|
||||
.. _pymongo-fork-safe-details:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user