-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.