Issue31107
Created on 2017-08-02 18:53 by ShaneHarvey, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 2989 | merged | python-dev, 2017-08-02 18:57 | |
| PR 3003 | merged | ShaneHarvey, 2017-08-04 21:06 | |
| PR 3004 | merged | ShaneHarvey, 2017-08-04 21:06 | |
| Messages (4) | |||
|---|---|---|---|
| msg299665 - (view) | Author: Shane Harvey (ShaneHarvey) * | Date: 2017-08-02 18:53 | |
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. |
|||
| msg299737 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-08-04 08:45 | |
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 |
|||
| msg299787 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-08-05 15:01 | |
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 |
|||
| msg299788 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-08-05 15:03 | |
New changeset 88ffff5ddbb8692ecb2c661aa29000dbde9eff8c 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/88ffff5ddbb8692ecb2c661aa29000dbde9eff8c |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:49 | admin | set | github: 75290 |
| 2017-08-05 15:24:03 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-08-05 15:03:03 | serhiy.storchaka | set | messages: + msg299788 |
| 2017-08-05 15:01:13 | serhiy.storchaka | set | messages: + msg299787 |
| 2017-08-04 21:06:56 | ShaneHarvey | set | pull_requests: + pull_request3039 |
| 2017-08-04 21:06:16 | ShaneHarvey | set | pull_requests: + pull_request3038 |
| 2017-08-04 08:45:05 | serhiy.storchaka | set | messages: + msg299737 |
| 2017-08-02 19:35:45 | serhiy.storchaka | set | assignee: serhiy.storchaka stage: patch review nosy:
+ serhiy.storchaka |
| 2017-08-02 19:07:07 | ShaneHarvey | set | versions: - Python 3.7 |
| 2017-08-02 18:57:56 | python-dev | set | pull_requests: + pull_request3027 |
| 2017-08-02 18:53:14 | ShaneHarvey | create | |