[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-10 Thread Éric Araujo
Éric Araujo added the comment: Confirmed (3.2): >>> def func(): ... t = collections.namedtuple('t', 'a') ... instance = t(1) ... print(instance) ... return pickle.dumps(instance) >>> func() t(a=1) Traceback (most recent call last): File "", line 1, in File "", line 5, in f

[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: As far as I can tell, this has nothing to do with daemon processes and all to do with the fact that user-defined classes have to be globally visible for their instances to be pickled. It is because pickles reference classes by name, and local names obviously

[issue13537] Namedtuple instances can't be pickled in a daemonized process

2011-12-06 Thread Popa Claudiu
New submission from Popa Claudiu : On Unix world, in a daemonized process, any namedtuple instance can't be pickled, failing with error: _pickle.PicklingError: Can't pickle class X: attribute lookup __main__.t failed. This can't be reproduced with the attached code. If I add the created class i