Making SocketHandler safe for use with non-pickleable objects
20 Jun
2022
20 Jun
'22
9:11 p.m.
I've been working on a bug in django where if you configure a logging.handlers.SocketHandler in the django logging config, it gets a TypeError because it tries to log a HttpRequest object, which can't be pickled. I'm slowly coming to the conclusion that this isn't a django bug, and the right fix is to make SocketHandler (and DatagramHandler) be able to deal with this internally. QueueHandler already does this, or at least the documentation says it does: prepare(record) ... removes unpickleable items from the record in-place. It seems like SocketHandler should do the same thing. Thoughts?
675
Age (days ago)
675
Last active (days ago)
0 comments
1 participants
participants (1)
-
roy@panix.com