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

Fix handling of PyModule_GetState

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • 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?

      Detailed steps to reproduce the problem?

      We are calling PyModule_GetState in our GETSTATE macro, but not handling the Null case.

      Definition of done: what must be done to consider the task complete?

      Check the return value of PyModule_GetState and goto fail if it returns NULL.

      The exact version of PyMongo used, with patch level:

      pymongo 4.7.0.dev0

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: