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

Support encoding bytearray datatype as bson.Binary

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
      None

      The bson.Binary type can be initialized with a bytes instances, but not with bytearray. We should consider relaxing the type-check in Binary._init_ to accept bytearray. This will provide a more seamless user-experience when trying to write binary data from Python datatypes to MongoDB.

            Assignee:
            Unassigned Unassigned
            Reporter:
            prashant.mital Prashant Mital (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: