[ 
https://issues.apache.org/jira/browse/PROTON-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17521648#comment-17521648
 ] 

Jiri Daněk edited comment on PROTON-2531 at 4/13/22 12:23 PM:
--------------------------------------------------------------

Bytes and strings are the same thing in C, it is all {{char*}}. It makes some 
sense trying to map this as string, for convenience. Of course, in Python3 the 
problem is that {{str}} should be Unicode string. Our tests use strings for the 
tags. I remember it is {{binary}} type in Proton C++.

I agree in Python it should be either {{bytes}}, or maybe one of the Python 
proton types wrapping binary data.


was (Author: jdanek):
Bytes and strings are the same thing in C, it is all {{char*}}. It makes some 
sense trying to map this as string, for convenience. Of course, in Python3 the 
problem is that {{str}} should be Unicode string. Our tests use strings for the 
tags. I remember it is {{binary}} type in Proton C++.

I agree in Python it should be either {{Bytes}}, or maybe one of the Python 
proton types wrapping binary data.

> 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.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to