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

Stub Files for PyMongo

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • pymongo-stubs-0.1
    • Affects Version/s: None
    • Component/s: pymongo-stubs
    • None

      I am wondering what the consensus is within the community as to the value of having stub files defined for PyMongo and BSON.

      Personally, I have been working on a project where we have been using typehints and had to create most of the stubs for the PyMongo modules. I'm sure that there is room for improvement as there are certainly many cases where the exact argument or return types are not perfectly clear, but I think it is something that would be beneficial to the community.

      Typeshed (https://github.com/python/typeshed) is the project started by Guido Van Rossum for housing internal and external stubfiles for Python modules/packages. The policy of the group is to get approval from package owners before including stubfiles in the repository.

      N.B. There are some rudimentary attempts at creating PyMongo stubfiles in the public domain already, so I feel like this is something that is in need of leadership either from the dev team or Typeshed to ensure unity/quality of any purported stubfile library.

      As a result I have 2 questions:
      1. Are stubfiles something that the PyMongo dev team feels are worthwhile and useful?
      2. If so would the team prefer to keep the development of these files internal or allow them to be developed by the open source community (preferably in typeshed)?

        1. screencast.gif
          519 kB
          Shane Harvey

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            Grr Grier Phillips
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: