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

Support nominal subtyping for Python <3.8

      https://docs.python.org/3/library/typing.html#nominal-vs-structural-subtyping

      Various classes we expose could benefit by using nominal subtyping. For example, the Cursor class should inherit from Iterable[Mapping[str, Any]] on Python <3.8.

      Python 3.8+ supports structural subtyping where the Cursor class does not need to inherit from Iterable.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: