[New-bugs-announce] [issue30520] loggers can't be pickled

Antoine Pitrou report at bugs.python.org
Wed May 31 03:50:48 EDT 2017

New submission from Antoine Pitrou:

Loggers could simply be pickled and unpickled by name, but pickle currently tries the hard way:

>>> import pickle
>>> import logging
>>> log = logging.getLogger('foo')
>>> pickle.dumps(log)
Traceback (most recent call last):
  File "<ipython-input-4-6ecead831873>", line 1, in <module>
TypeError: can't pickle _thread.RLock objects

components: Library (Lib)
messages: 294818
nosy: pitrou, vinay.sajip
priority: normal
severity: normal
status: open
title: loggers can't be pickled
type: enhancement
versions: Python 3.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list