Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3830

PyMongoCrypt Depends on Deprecated Distutils

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • pymongocrypt-1.7.0
    • Affects Version/s: None
    • Component/s: None
    • None

      We need to update PyMongoCrypt to support Python 3.12+:

      /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
      Python 3.12.0b3 (v3.12.0b3:f992a60014, Jun 19 2023, 18:05:04) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import pymongocrypt
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymongocrypt/binding.py", line 25, in <module>
          from pkg_resources import parse_version as _parse_version
      ModuleNotFoundError: No module named 'pkg_resources'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymongocrypt/__init__.py", line 15, in <module>
          from pymongocrypt.binding import libmongocrypt_version, lib
        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pymongocrypt/binding.py", line 27, in <module>
          from distutils.version import LooseVersion as _LooseVersion
      ModuleNotFoundError: No module named 'distutils'
       

      We may either depend on the packaging package or use a custom version parser instead.

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: