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

Replace as_class, tz_aware, and uuid_subtype with codec_options in BSON APIs

    XMLWordPrintableJSON

Details

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

    Description

      Functions and methods of the bson module that current accept the options as_class, tz_aware, and uuid_subtype will be changed to accept a codec_options parameter instead.

      For example, the function definition for bson.decode_all will change from this:

      def decode_all(data, as_class=dict, tz_aware=True, uuid_subtype=OLD_UUID_SUBTYPE)

      to:

      def decode_all(data, codec_options=CodecOptions())

      The following functions will change:

      • decode_all
      • decode_iter
      • decode_file_iter

      The following methods will change:

      • BSON.encode
      • BSON.decode

      This is a breaking change for any application that uses the BSON API directly and changes any of the named parameter defaults. No changes are required for applications that use the default values for these options. The behavior remains the same.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: