Remove NotMasterError

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Major Change
    • None
    • None
    • None
    • None
    • None
    • None

      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
      

            Assignee:
            Prashant Mital (Inactive)
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: