Skip to content

Commit 16cf778

Browse files
committed
Merge branch 'master' into PYTHON-4450
2 parents 124dcf5 + 2895e84 commit 16cf778

37 files changed

+293
-207
lines changed

.evergreen/config.yml

Lines changed: 58 additions & 115 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ a native Python driver for MongoDB. The `gridfs` package is a
1414
[gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst/)
1515
implementation on top of `pymongo`.
1616

17-
PyMongo supports MongoDB 3.6, 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0.
17+
PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0.
1818

1919
## Support / Feedback
2020

doc/changelog.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ Changes in Version 4.11.0
55
-------------------------
66

77
.. warning:: PyMongo 4.11 drops support for Python 3.8: Python 3.9+ or PyPy 3.9+ is now required.
8+
.. warning:: PyMongo 4.11 drops support for MongoDB 3.6. PyMongo now supports MongoDB 4.0+.
9+
Driver support for MongoDB 3.6 reached end of life in April 2024.
10+
11+
PyMongo 4.11 brings a number of changes including:
12+
13+
- Dropped support for Python 3.8.
14+
- Dropped support for MongoDB 3.6.
15+
16+
Issues Resolved
17+
...............
18+
19+
See the `PyMongo 4.11 release notes in JIRA`_ for the list of resolved issues
20+
in this release.
21+
22+
.. _PyMongo 4.11 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=40784
823

924
Changes in Version 4.10.1
1025
-------------------------

doc/common-issues.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Also see the :ref:`TLSErrors` section.
66
Server reports wire version X, PyMongo requires Y
77
-------------------------------------------------
88

9-
When one attempts to connect to a <=3.4 version server, PyMongo will throw the following error::
9+
When one attempts to connect to a <=3.6 version server, PyMongo will throw the following error::
1010

1111
>>> client.admin.command('ping')
1212
...
13-
pymongo.errors.ConfigurationError: Server at localhost:27017 reports wire version 5, but this version of PyMongo requires at least 6 (MongoDB 3.6).
13+
pymongo.errors.ConfigurationError: Server at localhost:27017 reports wire version 6, but this version of PyMongo requires at least 7 (MongoDB 4.0).
1414

1515
This is caused by the driver being too new for the server it is being run against.
16-
To resolve this issue either upgrade your database to version >= 3.6 or downgrade to PyMongo 3.x which supports MongoDB >= 2.6.
16+
To resolve this issue either upgrade your database to version >= 4.0 or downgrade to an early version of PyMongo which supports MongoDB < 4.0.
1717

1818

1919
'Cursor' object has no attribute '_Cursor__killed'

doc/examples/authentication.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ the "MongoDB Challenge-Response" protocol::
9797
Default Authentication Mechanism
9898
--------------------------------
9999

100-
If no mechanism is specified, PyMongo automatically SCRAM-SHA-1 when connected
101-
to MongoDB 3.6 and negotiates the mechanism to use (SCRAM-SHA-1
102-
or SCRAM-SHA-256) when connected to MongoDB 4.0+.
100+
If no mechanism is specified, PyMongo automatically negotiates the mechanism to use (SCRAM-SHA-1
101+
or SCRAM-SHA-256) with the MongoDB server.
103102

104103
Default Database and "authSource"
105104
---------------------------------

pymongo/asynchronous/collection.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,20 +1960,15 @@ async def _count_cmd(
19601960
collation: Optional[Collation],
19611961
) -> int:
19621962
"""Internal count command helper."""
1963-
# XXX: "ns missing" checks can be removed when we drop support for
1964-
# MongoDB 3.0, see SERVER-17051.
19651963
res = await self._command(
19661964
conn,
19671965
cmd,
19681966
read_preference=read_preference,
1969-
allowable_errors=["ns missing"],
19701967
codec_options=self._write_response_codec_options,
19711968
read_concern=self.read_concern,
19721969
collation=collation,
19731970
session=session,
19741971
)
1975-
if res.get("errmsg", "") == "ns missing":
1976-
return 0
19771972
return int(res["n"])
19781973

19791974
async def _aggregate_one_result(

pymongo/asynchronous/mongo_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,8 @@ def __init__(
498498
- `authSource`: The database to authenticate on. Defaults to the
499499
database specified in the URI, if provided, or to "admin".
500500
- `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options.
501-
If no mechanism is specified, PyMongo automatically SCRAM-SHA-1
502-
when connected to MongoDB 3.6 and negotiates the mechanism to use
503-
(SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+.
501+
If no mechanism is specified, PyMongo automatically negotiates the
502+
mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server.
504503
- `authMechanismProperties`: Used to specify authentication mechanism
505504
specific options. To specify the service name for GSSAPI
506505
authentication pass authMechanismProperties='SERVICE_NAME:<service

pymongo/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
MAX_WRITE_BATCH_SIZE = 1000
6767

6868
# What this version of PyMongo supports.
69-
MIN_SUPPORTED_SERVER_VERSION = "3.6"
70-
MIN_SUPPORTED_WIRE_VERSION = 6
69+
MIN_SUPPORTED_SERVER_VERSION = "4.0"
70+
MIN_SUPPORTED_WIRE_VERSION = 7
7171
# MongoDB 8.0
7272
MAX_SUPPORTED_WIRE_VERSION = 25
7373

pymongo/synchronous/collection.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,20 +1959,15 @@ def _count_cmd(
19591959
collation: Optional[Collation],
19601960
) -> int:
19611961
"""Internal count command helper."""
1962-
# XXX: "ns missing" checks can be removed when we drop support for
1963-
# MongoDB 3.0, see SERVER-17051.
19641962
res = self._command(
19651963
conn,
19661964
cmd,
19671965
read_preference=read_preference,
1968-
allowable_errors=["ns missing"],
19691966
codec_options=self._write_response_codec_options,
19701967
read_concern=self.read_concern,
19711968
collation=collation,
19721969
session=session,
19731970
)
1974-
if res.get("errmsg", "") == "ns missing":
1975-
return 0
19761971
return int(res["n"])
19771972

19781973
def _aggregate_one_result(

pymongo/synchronous/mongo_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,8 @@ def __init__(
496496
- `authSource`: The database to authenticate on. Defaults to the
497497
database specified in the URI, if provided, or to "admin".
498498
- `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options.
499-
If no mechanism is specified, PyMongo automatically SCRAM-SHA-1
500-
when connected to MongoDB 3.6 and negotiates the mechanism to use
501-
(SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+.
499+
If no mechanism is specified, PyMongo automatically negotiates the
500+
mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server.
502501
- `authMechanismProperties`: Used to specify authentication mechanism
503502
specific options. To specify the service name for GSSAPI
504503
authentication pass authMechanismProperties='SERVICE_NAME:<service

0 commit comments

Comments
 (0)