Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 11 additions & 41 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1014,33 +1014,6 @@ tasks:
TOPOLOGY: "server"
- func: "run doctests"

- name: "test-3.6-standalone"
tags: ["3.6", "standalone"]
commands:
- func: "bootstrap mongo-orchestration"
vars:
VERSION: "3.6"
TOPOLOGY: "server"
- func: "run tests"

- name: "test-3.6-replica_set"
tags: ["3.6", "replica_set"]
commands:
- func: "bootstrap mongo-orchestration"
vars:
VERSION: "3.6"
TOPOLOGY: "replica_set"
- func: "run tests"

- name: "test-3.6-sharded_cluster"
tags: ["3.6", "sharded_cluster"]
commands:
- func: "bootstrap mongo-orchestration"
vars:
VERSION: "3.6"
TOPOLOGY: "sharded_cluster"
- func: "run tests"

- name: "test-4.0-standalone"
tags: ["4.0", "standalone"]
commands:
Expand Down Expand Up @@ -2186,10 +2159,6 @@ axes:
- id: mongodb-version
display_name: "MongoDB"
values:
- id: "3.6"
display_name: "MongoDB 3.6"
variables:
VERSION: "3.6"
- id: "4.0"
display_name: "MongoDB 4.0"
variables:
Expand Down Expand Up @@ -2490,7 +2459,6 @@ buildvariants:
- ".4.4"
- ".4.2"
- ".4.0"
- ".3.6"

- matrix_name: "test-macos-arm64"
matrix_spec:
Expand Down Expand Up @@ -2562,7 +2530,6 @@ buildvariants:
- ".4.4"
- ".4.2"
- ".4.0"
- ".3.6"

- matrix_name: "tests-pyopenssl"
matrix_spec:
Expand Down Expand Up @@ -2657,19 +2624,22 @@ buildvariants:
display_name: "${compression} ${c-extensions} ${python-version} ${platform}"
tasks:
- "test-latest-standalone"
- "test-8.0-standalone"
- "test-7.0-standalone"
- "test-6.0-standalone"
- "test-5.0-standalone"
- "test-4.4-standalone"
- "test-4.2-standalone"
- "test-4.0-standalone"
rules:
# Server versions 3.6 and 4.0 support snappy and zlib.
# Server version 4.0 supports snappy and zlib but not zstd.
- if:
python-version: "*"
c-extensions: "*"
compression: ["snappy", "zlib"]
compression: ["zstd"]
then:
add_tasks:
remove_tasks:
- "test-4.0-standalone"
- "test-3.6-standalone"

- matrix_name: "tests-python-version-green-framework-rhel8"
matrix_spec:
Expand Down Expand Up @@ -2734,7 +2704,7 @@ buildvariants:
matrix_spec:
platform: rhel8
storage-engine: "*"
python-version: 3.9
python-version: "3.9"
display_name: "Storage ${storage-engine} ${python-version} ${platform}"
rules:
- if:
Expand All @@ -2751,7 +2721,6 @@ buildvariants:
- "test-4.4-standalone"
- "test-4.2-standalone"
- "test-4.0-standalone"
- "test-3.6-standalone"
- if:
# MongoDB 4.2 drops support for MMAPv1
platform: rhel8
Expand All @@ -2761,8 +2730,6 @@ buildvariants:
add_tasks:
- "test-4.0-standalone"
- "test-4.0-replica_set"
- "test-3.6-standalone"
- "test-3.6-replica_set"

# enableTestCommands=0 tests on RHEL 8.4 (x86_64) with Python 3.9.
- matrix_name: "test-disableTestCommands"
Expand Down Expand Up @@ -2881,6 +2848,9 @@ buildvariants:
tasks:
# Versioned API was introduced in MongoDB 4.7
- "test-latest-standalone"
- "test-8.0-standalone"
- "test-7.0-standalone"
- "test-6.0-standalone"
- "test-5.0-standalone"

- matrix_name: "ocsp-test"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ a native Python driver for MongoDB. The `gridfs` package is a
[gridfs](https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst/)
implementation on top of `pymongo`.

PyMongo supports MongoDB 3.6, 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0.
PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0.

## Support / Feedback

Expand Down
15 changes: 15 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ Changes in Version 4.11.0
-------------------------

.. warning:: PyMongo 4.11 drops support for Python 3.8: Python 3.9+ or PyPy 3.9+ is now required.
.. warning:: PyMongo 4.11 drops support for MongoDB 3.6. PyMongo now supports MongoDB 4.0+.
Driver support for MongoDB 3.6 reached end of life in April 2024.

PyMongo 4.11 brings a number of changes including:

- Dropped support for Python 3.8.
- Dropped support for MongoDB 3.6.

Issues Resolved
...............

See the `PyMongo 4.11 release notes in JIRA`_ for the list of resolved issues
in this release.

.. _PyMongo 4.11 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=40784

Changes in Version 4.10.1
-------------------------
Expand Down
6 changes: 3 additions & 3 deletions doc/common-issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Also see the :ref:`TLSErrors` section.
Server reports wire version X, PyMongo requires Y
-------------------------------------------------

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

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

This is caused by the driver being too new for the server it is being run against.
To resolve this issue either upgrade your database to version >= 3.6 or downgrade to PyMongo 3.x which supports MongoDB >= 2.6.
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.


'Cursor' object has no attribute '_Cursor__killed'
Expand Down
5 changes: 2 additions & 3 deletions doc/examples/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ the "MongoDB Challenge-Response" protocol::
Default Authentication Mechanism
--------------------------------

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

Default Database and "authSource"
---------------------------------
Expand Down
5 changes: 0 additions & 5 deletions pymongo/asynchronous/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,20 +1960,15 @@ async def _count_cmd(
collation: Optional[Collation],
) -> int:
"""Internal count command helper."""
# XXX: "ns missing" checks can be removed when we drop support for
# MongoDB 3.0, see SERVER-17051.
res = await self._command(
conn,
cmd,
read_preference=read_preference,
allowable_errors=["ns missing"],
codec_options=self._write_response_codec_options,
read_concern=self.read_concern,
collation=collation,
session=session,
)
if res.get("errmsg", "") == "ns missing":
return 0
return int(res["n"])

async def _aggregate_one_result(
Expand Down
5 changes: 2 additions & 3 deletions pymongo/asynchronous/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,8 @@ def __init__(
- `authSource`: The database to authenticate on. Defaults to the
database specified in the URI, if provided, or to "admin".
- `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options.
If no mechanism is specified, PyMongo automatically SCRAM-SHA-1
when connected to MongoDB 3.6 and negotiates the mechanism to use
(SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+.
If no mechanism is specified, PyMongo automatically negotiates the
mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server.
- `authMechanismProperties`: Used to specify authentication mechanism
specific options. To specify the service name for GSSAPI
authentication pass authMechanismProperties='SERVICE_NAME:<service
Expand Down
5 changes: 0 additions & 5 deletions pymongo/synchronous/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1959,20 +1959,15 @@ def _count_cmd(
collation: Optional[Collation],
) -> int:
"""Internal count command helper."""
# XXX: "ns missing" checks can be removed when we drop support for
# MongoDB 3.0, see SERVER-17051.
res = self._command(
conn,
cmd,
read_preference=read_preference,
allowable_errors=["ns missing"],
codec_options=self._write_response_codec_options,
read_concern=self.read_concern,
collation=collation,
session=session,
)
if res.get("errmsg", "") == "ns missing":
return 0
return int(res["n"])

def _aggregate_one_result(
Expand Down
5 changes: 2 additions & 3 deletions pymongo/synchronous/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ def __init__(
- `authSource`: The database to authenticate on. Defaults to the
database specified in the URI, if provided, or to "admin".
- `authMechanism`: See :data:`~pymongo.auth.MECHANISMS` for options.
If no mechanism is specified, PyMongo automatically SCRAM-SHA-1
when connected to MongoDB 3.6 and negotiates the mechanism to use
(SCRAM-SHA-1 or SCRAM-SHA-256) when connected to MongoDB 4.0+.
If no mechanism is specified, PyMongo automatically negotiates the
mechanism to use (SCRAM-SHA-1 or SCRAM-SHA-256) with the MongoDB server.
- `authMechanismProperties`: Used to specify authentication mechanism
specific options. To specify the service name for GSSAPI
authentication pass authMechanismProperties='SERVICE_NAME:<service
Expand Down
Loading