Author ShaneHarvey
Recipients ShaneHarvey
Date 2017-08-02.18:53:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This line in copyreg._slotnames does not properly calculate mangled attribute names:

The problem is that it does not strip leading underscores from the class name:

>>> class _LeadingUnderscoreClassName(object):
...     __slots__ = ("__bar",)
>>> import copy_reg
>>> copy_reg._slotnames(_LeadingUnderscoreClassName)

The result is that copy, pickle, and anything else that relies on _slotnames() do not work on classes with leading underscores and private __slots__. This bug is present in all versions of Python.
Date User Action Args
2017-08-02 18:53:14ShaneHarveysetrecipients: + ShaneHarvey
2017-08-02 18:53:14ShaneHarveysetmessageid: <>
2017-08-02 18:53:14ShaneHarveylinkissue31107 messages
2017-08-02 18:53:14ShaneHarveycreate