Author ndjensen
Recipients Zbigniew.Kacprzak, ndjensen, python-dev, vinay.sajip
Date 2015-03-11.21:00:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm not sure this was fixed in an optimal way.

We have a set of processes using the SocketHandler to send log records to a single log process.  Some of these log records have the msg attribute as a dictionary that contained a variety of extra information about the event that was being logged.  After this change, our process receiving the events and logging to a file stopped working correctly because it was expecting a dictionary for the msg but was always receiving a string.  (I have since made it smarter).

The fix for this ticket makes sense when you don't have a guarantee of being able to unpickle the msg on the receiving end, but it also limits some of the adaptability to pass objects using the SocketHandler.

Some possible improvements:
1. Add a flag to SocketHandler on whether or not it should force the msg to a string
2. If it's it a built-in picklable type, don't force to string, else force msg to string

Suggestion 2 has some drawbacks in that you'd have to loop over lists, dictionaries, etc to verify everything inside there is also picklable.  Also it would prevent you from sending custom objects across.
Date User Action Args
2015-03-11 21:00:10ndjensensetrecipients: + ndjensen, vinay.sajip, python-dev, Zbigniew.Kacprzak
2015-03-11 21:00:10ndjensensetmessageid: <>
2015-03-11 21:00:10ndjensenlinkissue14436 messages
2015-03-11 21:00:10ndjensencreate