[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset af839fe2fef12dbbc8083fc7f01daee48a85a916 by Serhiy Storchaka in branch '3.6': bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750) https://github.com/python/cpython/commit/af839fe2fef12dbbc8083fc7f01daee48a85a916 --

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Xiang Zhang
Xiang Zhang added the comment: I think 3.6 is enough. -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I treat this as a bugfix but I hesitated about backporting it. Py_SIZE works "by accident" and we can't change the layout of PyDictObject structure in maintain branches. I have backported the fix to 3.6, but not to other branches since PyDict_GET_SIZE

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +664 ___ Python tracker ___ ___

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Xiang Zhang
Xiang Zhang added the comment: How about 3.6, Serhiy? I see you treat this as a bugfix on the PR. -- nosy: +xiang.zhang ___ Python tracker ___

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +661 ___ Python tracker ___ ___

[issue29864] Misuse of Py_SIZE in dict.fromkey()

2017-03-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In dict.fromkeys() implementation when a dict is passed its size is determined by using the Py_SIZE macro. This is not correct since PyDictObject is not a PyVarObject (but see issue28988). -- components: Interpreter Core messages: 289915 nosy: