[issue31107] copyreg does not properly mangle __slots__ names

2017-08-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 885ddbb8692ecb2c661aa29000dbde9eff8c by Serhiy Storchaka 
(Shane Harvey) in branch '2.7':
[2.7] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989). (#3004)
https://github.com/python/cpython/commit/885ddbb8692ecb2c661aa29000dbde9eff8c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 4795ba857ef2a89e6b477285df961672106a1792 by Serhiy Storchaka 
(Shane Harvey) in branch '3.6':
[3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003)
https://github.com/python/cpython/commit/4795ba857ef2a89e6b477285df961672106a1792


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-04 Thread Shane Harvey

Changes by Shane Harvey :


--
pull_requests: +3039

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-04 Thread Shane Harvey

Changes by Shane Harvey :


--
pull_requests: +3038

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c4c9866064f03646c686d7e08b00aeb203c35c19 by Serhiy Storchaka 
(Shane Harvey) in branch 'master':
bpo-31107: Fix copyreg mangled slot names calculation. (#2989)
https://github.com/python/cpython/commit/c4c9866064f03646c686d7e08b00aeb203c35c19


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.7 -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-02 Thread Shane Harvey

Changes by Shane Harvey :


--
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-02 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3027

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31107] copyreg does not properly mangle __slots__ names

2017-08-02 Thread Shane Harvey

New submission from Shane Harvey:

This line in copyreg._slotnames does not properly calculate mangled attribute 
names:
https://github.com/python/cpython/blob/v3.6.2/Lib/copyreg.py#L131

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)
['__LeadingUnderscoreClassName__bar']

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.

--
components: Library (Lib)
messages: 299665
nosy: Shane Harvey
priority: normal
severity: normal
status: open
title: copyreg does not properly mangle __slots__ names
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com