You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2018/03/05 17:40:00 UTC

[jira] [Commented] (PROTON-1758) [Python binding] Check message application property keys, convert binary to string

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

Justin Ross commented on PROTON-1758:
-------------------------------------

[~kpvdr], NB, if you fail to set the fix version, we miss it in the release notes.

> [Python binding] Check message application property keys, convert binary to string
> ----------------------------------------------------------------------------------
>
>                 Key: PROTON-1758
>                 URL: https://issues.apache.org/jira/browse/PROTON-1758
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Minor
>             Fix For: proton-c-0.21.0
>
>
> The AMQP 1.0 specification requires message application property keys to be strings. Currently the Python binding makes no type check on message application property key types. Under Python 2, using the pattern
> {noformat}
> props['key'] = 'value'{noformat}
> results in the key being encoded as binary, whereas in Python 3, it is a unicode string. While changing the pattern to
> {noformat}
> props[u'key'] = u'value'{noformat}
> is trivially easy and would work for both versions of Python, it would help usability and AMQP wire correctness if the binding would check the key type and:
>  # if binary, convert to unicode string;
>  # if any other type, raise an exception
> before sending a message.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org