[
https://issues.apache.org/jira/browse/PROTON-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522227#comment-17522227
]
Jiri Daněk commented on PROTON-2531:
------------------------------------
{code}
/* We cannot safely just wrap pn_bytes_t but each language binding must have a
typemap for it - presumably to a string type */
%ignore pn_bytes_t;
%ignore pn_rwbytes_t;
{code}
I think we'd have to do the full dance of deprecating old property and defining
new property (strawman proposal: {{def btag(self) -> binary}}), because we
cannot break those who depend on the exact type of
{code}
@property
def tag(self) -> str:
"""
The identifier for the delivery.
"""
return pn_delivery_tag(self._impl)
{code}
When we promised to return {{str}} like this, I think it should not be broken.
There may be more than the tag to reconsider, in a move to binary (?)
[~astitcher] WDYT, as the Python binding BDFL?
> 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]