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

Remove NotMasterError

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • None
    • Major Change

    Description

      We should consider deprecating NotMasterError and renaming it to NotPrimaryError.

      Apps that need to be pymongo 3+4 compatible will need to be updated like this:

      try:
          # PyMongo >=3.12
          from pymongo.errors import NotPrimaryError
      except ImportError:
          # PyMongo <=3.11
          from pymongo.errors import NotMasterError as NotPrimaryError
      

      Attachments

        Issue Links

          Activity

            People

              prashant.mital Prashant Mital (Inactive)
              shane.harvey@mongodb.com Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: