[Build Failure] Older gevent depends on removed pkg_resources package

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 4.17.0
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • Python Drivers
    • Not Needed
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      ModuleNotFoundError: No module named 'pkg_resources'

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_green_gevent_rhel8_test_standard_v5.0_python3.10_sync_noauth_ssl_replica_set_min_deps_0441761872fcf4d6060b558b4cdd4a261377bcbf_26_02_09_20_51_30/logs?execution=0

      Context of when and why the failure occurred:

      Gevent used to depend on pkg_resources, which they removed in later versions.
      https://github.com/gevent/gevent/issues/1964

      pkg_resources is not longer shipped with setuptools 82.0.0.

      We may have to pin the version of setuptools used when MIN_DEPS and gevent are used.

      Stack trace:

      [2026/02/09 14:54:16.812] Traceback (most recent call last):
      [2026/02/09 14:54:16.812]   File "/data/mci/01c17ce02c28779ff39b36b58b6f7676/src/.evergreen/scripts/run_tests.py", line 216, in <module>
      [2026/02/09 14:54:16.812]     run()
      [2026/02/09 14:54:16.812]   File "/data/mci/01c17ce02c28779ff39b36b58b6f7676/src/.evergreen/scripts/run_tests.py", line 145, in run
      [2026/02/09 14:54:16.812]     handle_green_framework()
      [2026/02/09 14:54:16.812]   File "/data/mci/01c17ce02c28779ff39b36b58b6f7676/src/.evergreen/scripts/run_tests.py", line 74, in handle_green_framework
      [2026/02/09 14:54:16.812]     monkey.patch_all()
      [2026/02/09 14:54:16.812]   File "/data/mci/01c17ce02c28779ff39b36b58b6f7676/src/.venv/lib/python3.10/site-packages/gevent/monkey.py", line 1253, in patch_all
      [2026/02/09 14:54:16.812]     from gevent import events
      [2026/02/09 14:54:16.812]   File "/data/mci/01c17ce02c28779ff39b36b58b6f7676/src/.venv/lib/python3.10/site-packages/gevent/events.py", line 74, in <module>
      [2026/02/09 14:54:16.812]     from pkg_resources import iter_entry_points
      [2026/02/09 14:54:16.812] ModuleNotFoundError: No module named 'pkg_resources'
      [2026/02/09 14:54:16.852] error: Recipe `run-tests` failed on line 68 with exit code 1
      

            Assignee:
            Steve Silvester
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: