-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: pymongo-stubs
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.