Skip to content

Commit 09aeef0

Browse files
authored
Changelog 4.3 (#1038)
1 parent cfc99c8 commit 09aeef0

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

doc/changelog.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
Changelog
22
=========
33

4+
Changes in Version 4.3
5+
----------------------
6+
7+
PyMongo 4.3 brings a number of improvements including:
8+
9+
- Added support for decoding BSON datetimes outside of the range supported
10+
by Python's :class:`~datetime.datetime` builtin. See
11+
:ref:`handling-out-of-range-datetimes` for examples, as well as
12+
:class:`bson.datetime_ms.DatetimeMS`,
13+
:class:`bson.codec_options.DatetimeConversion`, and
14+
:class:`bson.codec_options.CodecOptions`'s ``datetime_conversion``
15+
parameter for more details (`PYTHON-1824`_).
16+
- Added support for using a :class:`~pymongo.mongo_client.MongoClient` after
17+
an :py:func:`os.fork` (`PYTHON-2484`_).
18+
19+
Bug fixes
20+
.........
21+
22+
- Fixed a bug where :class:`~pymongo.change_stream.ChangeStream`
23+
would allow an app to retry calling ``next()`` or ``try_next()`` even
24+
after non-resumable errors (`PYTHON-3389`_).
25+
26+
Issues Resolved
27+
...............
28+
29+
See the `PyMongo 4.3 release notes in JIRA`_ for the list of resolved issues
30+
in this release.
31+
32+
.. _PYTHON-1824: https://jira.mongodb.org/browse/PYTHON-1824
33+
.. _PYTHON-2484: https://jira.mongodb.org/browse/PYTHON-2484
34+
.. _PYTHON-3389: https://jira.mongodb.org/browse/PYTHON-3389
35+
.. _PyMongo 4.3 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=33425
36+
437
Changes in Version 4.2
538
----------------------
639

doc/faq.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ for threaded applications.
1414
Is PyMongo fork-safe?
1515
---------------------
1616

17-
PyMongo is not fork-safe. Care must be taken when using instances of
18-
:class:`~pymongo.mongo_client.MongoClient` with ``fork()``. Specifically,
19-
instances of MongoClient must not be copied from a parent process to
20-
a child process. Instead, the parent process and each child process must
21-
create their own instances of MongoClient. Instances of MongoClient copied from
22-
the parent process have a high probability of deadlock in the child process due
23-
to the inherent incompatibilities between ``fork()``, threads, and locks
24-
described :ref:`below <pymongo-fork-safe-details>`. PyMongo will attempt to
25-
issue a warning if there is a chance of this deadlock occurring.
17+
Starting in PyMongo 4.3, forking on a compatible Python interpreter while
18+
using a client will result in all locks held by :class:`~bson.objectid
19+
.ObjectId` and :class:`~pymongo.mongo_client.MongoClient` being released in
20+
the child, as well as state shared between child and parent processes being
21+
reset.
22+
23+
If greenlet has been imported (usually with a library like gevent or
24+
Eventlet), care must be taken when using instances of :class:`~pymongo
25+
.mongo_client.MongoClient` with ``fork()``. Specifically, instances of
26+
MongoClient must not be copied from a parent process to a child process.
27+
Instead, the parent process and each child process must create their own
28+
instances of MongoClient. Instances of MongoClient copied from the parent
29+
process have a high probability of deadlock in the child process due to the
30+
inherent incompatibilities between ``fork()``, threads, and locks described
31+
:ref:`below<pymongo-fork-safe-details>`.
2632

2733
.. _pymongo-fork-safe-details:
2834

0 commit comments

Comments
 (0)