Dependabot importlib-metadata updates (8.8+) blocked by Python 3.9 support

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      Same root cause as PYTHON-5936. Dependabot opened PR #2927 to bump importlib-metadata from >=7.0 to >=9.0.0, but this cannot be adopted while PyMongo still supports Python 3.9.

      Root cause

      • importlib-metadata removed Python 3.9 compatibility in version 8.8.0; v9.0.0 is the major release incorporating that (and other breaking behavioral changes, e.g. raising MetadataNotFound/FileNotFoundError instead of returning None for missing metadata).
      • PyMongo still targets Python 3.9: pyproject.toml sets requires-python = ">=3.9" and lists the Python :: 3.9 classifier.
      • importlib-metadata is pinned in requirements/test.txt as importlib_metadata>=7.0;python_version < "3.13".

      Because of this, importlib-metadata 8.8+ will not install on Python 3.9. Any Dependabot PR raising the lower bound to 8.8+/9.0+ cannot be merged until Python 3.9 support is removed.

      Action

      Ignore/hold this Dependabot update for now. Once PyMongo drops Python 3.9 support, we can accept the newer importlib-metadata version and raise the lower bound accordingly.

      Related: PYTHON-5936 (same issue for requests).

            Assignee:
            Unassigned
            Reporter:
            Alex Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: