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

Pymongo 4.7.0 messes up imports

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 4.7
    • Component/s: Python Support
    • Labels:
      None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Detailed steps to reproduce the problem?

       

      python -mpip install dnspython==2.2.1 pymongo==4.7.0

      python -c "import dns.resolver;print(dns.resolver)"  

      <module 'dns.resolver' from '/private/tmp/foo/lib/python3.12/site-packages/dns/resolver.py'>

      python -c "import pymongo;import dns.resolver;print(dns.resolver)"

      Traceback (most recent call last):

        File "<string>", line 1, in <module>

      AttributeError: module 'dns' has no attribute 'resolver'

      Definition of done: what must be done to consider the task complete?

      Importing pymongo should not affect the import if dns.resolver

      The exact Python version used, with patch level:

      $

      3.9.12 (main, Apr  5 2022, 01:52:34) 

      [Clang 12.0.0 ]

      "

      Also reproducible on Python 3.12

      The exact version of PyMongo used, with patch level:

      4.7.0

      True

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)

      Security Vulnerabilities

      If you've identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here

            Assignee:
            Unassigned Unassigned
            Reporter:
            rly@combination.se Rickard Lyrenius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: