[issue19772] str serialization of Message object may mutate the payload and CTE.
R. David Murray
report at bugs.python.org
Fri Feb 7 20:27:50 CET 2014
R. David Murray added the comment:
While the copy solution seems reasonable, unfortunately it looks like the solution isn't that simple.
Your test method didn't start with 'test_', so it didn't get run. Your fix doesn't fix the problem, since other parts of the code are holding on to a pointer to the original message object. But even if I change your fix to only make a local copy and use it to get the transformed payload, that fix breaks other tests, since the *headers* aren't changed in the output, even if the payload is. This is because of the odd way the generator accumulates its output, and I unfortunately don't have time to remember how it all works in order to craft a fix before the 3.4 alpha :(.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19772>
_______________________________________
More information about the Python-bugs-list
mailing list