[ https://issues.apache.org/jira/browse/PROTON-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921807#comment-17921807 ]
Pete Fawcett commented on PROTON-2531: -------------------------------------- [~astitcher] Yes, this is a regression since 0.38 - I haven't tried 0.39. In 0.38, if the Qpid broker sent a tag {{bytes([0, 0, 0, 128])}} then the Python client would receive {{delivery.tag == '\x00\x00\x00\x80'}} i.e. a string but with a direct character to byte correlation with the original tag - and no exception thrown. I find the SWIG version rather opaque so can't see exactly how it is achieving this but the result is clear. I agree with your inclination to return a bytes object. It might cause some annoyance with users who need to change their client code, but I think it is cleaner - and preferable to having code fail with exceptions when communicating with a broker. I will raise a separate ticket. Thanks > Delivery tag is str while it should be bytes > -------------------------------------------- > > Key: PROTON-2531 > URL: https://issues.apache.org/jira/browse/PROTON-2531 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding > Reporter: Ievgen Popovych > Priority: Major > > According to AMQP standard delivery tag is ??up to 32 octets of binary > data??. Proton C library also has it in binary format. > But in the Python binding {{Delivery.tag}} is a string, which causes issues > when trying to use it (i.e. print/visualize). > As far as I understand this is down to Swig {{python/cproton.i}} > {{wrap_pn_delivery_tag}} (since typemap for {{pn_delivery_tag_t}} seems to be > correct)? -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org