Closed madss closed 6 years ago
Hello @madss,
I do not remember why I did put this assertion. Did you test without ?
Okay, it seems the assert is totally useless. Do you want to provide a patch with a test ?
Yes, I'll be happy to do that.
I've made this pull request: https://github.com/Polyconseil/aioamqp/pull/177
closed with #177
It is currently not possible to send an empty payload with
basic_publish
because of this assertion. The original commit that introduced the assertion doesn't mention anything about why it was added, but it makes it difficult to send protobuf encoded messages since an empty sequence of bytes is actually a perfectly valid protobuf message.Is there a technical reason for this or is it purely to prevent people from making mistakes in certain situations? If the latter is the case, I would like to see it removed so it doesn't prevent the use of protobuf.