Support encoding bytearray datatype as bson.Binary

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Prashant Mital (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: