PyPy test collection failure

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • 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:

      TypeError: document_class must be dict, bson.son.SON, ...
      

      Link to task:

      https://spruce.corp.mongodb.com/task/mongo_python_driver_min_support_rhel8_test_min_support_pypy3.10_replica_set_noauth_ssl_4eb4d6dc5b5811d841c9e6c85b6dec67c0b992a2_26_07_06_12_30_01/tests?execution=0

      Context of when and why the failure occurred:

      The failure was introduced by PYTHON-5858, which changed some base classes based on ruff linting rules.

      Stack trace:

      [2026/07/06 07:50:39.170] ERROR: collection failure ()
      [2026/07/06 07:50:39.170] test/asynchronous/test_auth_spec.py:35: in <module>
      [2026/07/06 07:50:39.170]     from test.asynchronous.unified_format import generate_test_classes, get_test_path
      [2026/07/06 07:50:39.170] test/asynchronous/unified_format.py:52: in <module>
      [2026/07/06 07:50:39.170]     from pymongo.asynchronous.encryption import AsyncClientEncryption
      [2026/07/06 07:50:39.170] pymongo/asynchronous/encryption.py:107: in <module>
      [2026/07/06 07:50:39.170]     _DATA_KEY_OPTS: CodecOptions[dict[str, Any]] = CodecOptions(
      [2026/07/06 07:50:39.170] bson/codec_options.py:389: in __new__
      [2026/07/06 07:50:39.170]     raise TypeError(
      [2026/07/06 07:50:39.170] E   TypeError: document_class must be dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a subclass of collections.abc.MutableMapping
      

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

              Created:
              Updated: