Skip to content

Commit

Permalink
MOTOR-1351 Bump minimum PyMongo version to 3.9 (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Sep 18, 2024
1 parent e13888b commit cf7b4cf
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Motor 3.6.0
- Add support for MongoDB 8.0 and PyMongo 4.9.
- The length parameter in :meth:`MotorCursor.to_list` is now optional.

.. note::

This is the last planned minor version of Motor. We are sunsetting Motor in favor of native
asyncio support in PyMongo 4.9+. We will continue to provide security releases and bug fixes for
Motor, but it will not gain new features.

Motor 3.5.1
-----------
- Fix runtime behavior of Motor generic class typing, e.g. ``client: AsyncIOMotorClient[Dict[str, Any]]``.
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# This file is execfile()d with the current directory set to its containing dir.
import os
import sys
from importlib.metadata import metadata

sys.path[0:0] = [os.path.abspath("..")]

from pymongo import version as pymongo_version # noqa: E402

import motor # noqa: E402

# -- General configuration -----------------------------------------------------
Expand Down Expand Up @@ -218,6 +217,7 @@
"member-order": "groupwise",
}

pymongo_version = metadata("pymongo")["version"]
pymongo_inventory = ("https://pymongo.readthedocs.io/en/%s/" % pymongo_version, None)

intersphinx_mapping = {
Expand Down
5 changes: 3 additions & 2 deletions doc/migrate-to-motor-3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,9 @@ incoming documents after receiving them from PyMongo.
Alternatively, if your application uses the ``SONManipulator`` API to convert
custom types to BSON, the :class:`~bson.codec_options.TypeCodec` and
:class:`~bson.codec_options.TypeRegistry` APIs may be a suitable alternative.
For more information, see the
:external:pymongo:doc:`custom type example <examples/custom_type>`.
For more information, see the `Custom Types documentation`_.

.. _Custom Types documentation: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/custom-types/#std-label-pymongo-custom-types

GridFS changes
--------------
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ Tracker = "https://jira.mongodb.org/projects/MOTOR/issues"
path = "motor/_version.py"
validate-bump = false

[tool.hatch.metadata]
# TODO: MOTOR-1351 Remove before releasing Motor 3.6.
allow-direct-references = true

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pymongo @ git+https:/mongodb/mongo-python-driver.git
pymongo>=4.9,<4.10
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ deps =
-rrequirements/docs.txt
changedir = doc
commands =
# TODO: MOTOR-1351 Add -W before releasing Motor 3.6.
python -m sphinx -q -E -b html . {envtmpdir}/html {posargs}
python -m sphinx -q -W -E -b html . {envtmpdir}/html {posargs}

[testenv:doctest]
setenv = PYTHONHASHSEED=0
Expand Down

0 comments on commit cf7b4cf

Please sign in to comment.