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

Make read preference a class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None
    • Minor Change

    Description

      Starting with PyMongo 3.0 read preferences will be a class instead of an integer representing the mode of the preference. A separate class will exist for each preference, with all preferences other than Primary accepting tag sets as an optional parameter (primary preference is incompatible with tag sets).

      The tag_sets attribute of MongoClient, Database, and Collection will be removed and become a part of compatible read preference instances instead.

      The read_preferences.ReadPreference global will continue to exist in a mostly backward compatible way, though its attributes will be instances of the read preference classes instead of integers. The change should only be backward breaking for applications that currently use tag_sets.

      Attachments

        Activity

          People

            bernie@mongodb.com Bernie Hackett
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: