-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40648/
-----------------------------------------------------------
Review request for qpid, Justin Ross and Kenneth Giusti.
Bugs: PROTON-1060
https://issues.apache.org/jira/browse/PROTON-1060
Repository: qpid-proton-git
Description
-------
Several of the Python binding API calls for message properties do not use the
correct types. To align them properly with the AMQP 1.0 spec, the following
APIs need changing:
Subject
-------
The spec for this is: <field name="subject" type="string"/>
_get_subject() should return a unicode string, not a regular string;
_set_subject() should accept a unicode string, not a regular string.
Content Type
------------
The spec for this is: <field name="content-type" type="symbol"/>
_get_content_type() should return a symbol, not a regular string;
_set_content_type() should accept a symbol, not a regular string.
Content Encoding
----------------
The spec for this is <field name="content-encoding" type="symbol"/>
_get_content_encoding() should return a symbol, not a regular string;
_set_content_encoding() should accept a symbol, not a regular string.
Group Id
--------
The spec for this is <field name="group-id" type="string"/>
_get_group_id() should return a unicode string, not a regular string;
_set_group_id() should accept a unicode string, not a regular string.
Reply-To Group Id
-----------------
The spec for this is <field name="reply-to-group-id" type="string"/>
_get_reply_to_group_id() should return a unicode string, not a regular string;
_set_reply_to_group_id() should accept a unicode string, not a regular string.
This patch makes the above changes to the API.
Diffs
-----
proton-c/bindings/python/proton/__init__.py
2a87fe7b267589ad65a3eb26dc196406288dbbad
tests/python/proton_tests/message.py 7aa9fac239ba6ee62e46588f855bb4e72d63a0e7
Diff: https://reviews.apache.org/r/40648/diff/
Testing
-------
The tests proton_tests.message.AccessorsTest.testContentType and
proton_tests.message.AccessorsTest.testContentEncoding were modified to use the
new API type. The python tests pass.
This has been tested fairly extensively within qpid-interop-test, and works as
it should.
Thanks,
Kim van der Riet