Author serhiy.storchaka
Recipients abarry, alegonz, levkivskyi, serhiy.storchaka, steven.daprano
Date 2019-06-16.19:37:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560713829.5.0.677405601178.issue28869@roundup.psfhosted.org>
In-reply-to
Content
>>> from abc import *
>>> A = ABCMeta('A', (), {})
>>> A.__module__
'abc'
>>> import pickle, pickletools
>>> pickletools.dis(pickletools.optimize(pickle.dumps(A)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'abc.A'>: attribute lookup A on abc failed
>>> A.__module__ = None
>>> pickletools.dis(pickletools.optimize(pickle.dumps(A)))
    0: \x80 PROTO      4
    2: \x95 FRAME      15
   11: \x8c SHORT_BINUNICODE '__main__'
   21: \x8c SHORT_BINUNICODE 'A'
   24: \x93 STACK_GLOBAL
   25: .    STOP
highest protocol among opcodes = 4
History
Date User Action Args
2019-06-16 19:37:09serhiy.storchakasetrecipients: + serhiy.storchaka, steven.daprano, levkivskyi, abarry, alegonz
2019-06-16 19:37:09serhiy.storchakasetmessageid: <1560713829.5.0.677405601178.issue28869@roundup.psfhosted.org>
2019-06-16 19:37:09serhiy.storchakalinkissue28869 messages
2019-06-16 19:37:09serhiy.storchakacreate