msg237868 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2015-03-11 14:42 |
Proposed patch gets rid of uses and mentions of bad dunder names. I.e. names inherited from Python 2: __cmp__, __nonzero__, __getslice__, __unicode__, __div__, etc. They are replaced by correct names (__truediv__, __floordiv__, __eq__, __bool__, etc) or removed. Also fixed typos and other minor bugs. Also added support for __matmul__ and __getnewargs_ex__ in unittest.mock and added tests for __matmul__. |
|
|
msg237869 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2015-03-11 14:54 |
> Also added support for __matmul__ and __getnewargs_ex__ in unittest.mock [...] See issue 23581 for __matmul__ support. |
|
|
msg237908 - (view) |
Author: Martin Panter (martin.panter) *  |
Date: 2015-03-11 23:32 |
I’m not very familiar with the mock module so can't comment if removing div is sensible there. But all the other changes seem reasonable. I just left a few suggestions for further tweaks on Rietveld. |
|
|
msg237976 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2015-03-12 19:07 |
Do you want first commit the patch in Berker? |
|
|
msg237978 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2015-03-12 19:12 |
> Do you want first commit the patch in Berker? I just committed it. Thanks for the review :) |
|
|
msg237980 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-03-12 20:01 |
New changeset 7522bb14e36a by Serhiy Storchaka in branch '3.4': Issue #23641: Cleaned out legacy dunder names from tests and docs. https://hg.python.org/cpython/rev/7522bb14e36a New changeset 9332a545ad85 by Serhiy Storchaka in branch 'default': Issue #23641: Cleaned out legacy dunder names from tests and docs. https://hg.python.org/cpython/rev/9332a545ad85 |
|
|
msg237981 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2015-03-12 20:04 |
Committed all except changes to multiprocessing.sharedctypes (remove __getslice__ and __setslice__) and unittest.mock (remove __div__, add __getnewargs_ex__). |
|
|
msg268852 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-06-19 15:32 |
New changeset 75cec736f87d by Serhiy Storchaka in branch '3.5': Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. https://hg.python.org/cpython/rev/75cec736f87d New changeset 4c5f7b61b6c5 by Serhiy Storchaka in branch 'default': Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. https://hg.python.org/cpython/rev/4c5f7b61b6c5 |
|
|
msg268853 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2016-06-19 15:34 |
I'm not sure about removing __getslice__ and __setslice__ from multiprocessing.sharedctypes and __div__ from unittest.mock, and left them as is. |
|
|