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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Major Change

      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.

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

              Created:
              Updated:
              Resolved: