Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-1285

Add generics to type stubs

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers

      Context

      External contribution in https://github.com/mongodb/motor/pull/272.

      "This PR adds generics to type stubs to match pymongo. For example, MongoClient is generic on its _DocumentType. This PR makes AgnosticClient, AsyncIOMotorClient, and MotorClient also generic on the same _DocumentType (as well as all the other classes where the corresponding pymongo class is generic, including Database, Collection, ChangeStream, and the various Cursors)."

      Definition of done

      Generics are added and tested.

      Pitfalls

      The semantics of generics may change slightly with PYTHON-3992, so we may have to update tests and add a note about the change after we adopt it in pymongo.

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

              Created:
              Updated:
              Resolved: