You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to release 1.1 while respecting semantic versioning (and not introducing a breaking change), we should make add_document_by_bytearray backwards compatible. In the released version 1.0 it takes a bytearray as the first param. Currently in develop, and the unreleased main, it takes filename first and byte_array second.
I'd suggest we do 1 of 2 things:
Revert add_document_by_bytearray to the original parameter order, and add a comment that the method is deprecated in favor of a new method, e.g. add_document_by_bytes. Add that new method with the correct parameter order. Change the implementation of add_document_by_bytearray to call add_document_by_bytes, to keep it DRY.
Modify add_document_by_bytearray so that it can detect when filename is passed as the first param and not break.
I think approach (1) is cleaner.
The text was updated successfully, but these errors were encountered:
In order to release 1.1 while respecting semantic versioning (and not introducing a breaking change), we should make
add_document_by_bytearray
backwards compatible. In the released version 1.0 it takes a bytearray as the first param. Currently indevelop
, and the unreleasedmain
, it takesfilename
first andbyte_array
second.I'd suggest we do 1 of 2 things:
add_document_by_bytearray
to the original parameter order, and add a comment that the method is deprecated in favor of a new method, e.g.add_document_by_bytes
. Add that new method with the correct parameter order. Change the implementation ofadd_document_by_bytearray
to calladd_document_by_bytes
, to keep it DRY.add_document_by_bytearray
so that it can detect when filename is passed as the first param and not break.I think approach (1) is cleaner.
The text was updated successfully, but these errors were encountered: