Skip to content

Conversation

@methane
Copy link
Member

@methane methane commented Mar 22, 2018

bpo-32999 too. So fc7df0e is not required
anymore. Revert it except test case.

https://bugs.python.org/issue32999

bpo-33018 (fc7df0e is not required
anymore.  Revert it except test case.
ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just one comment.

Modules/_abc.c Outdated
end:
Py_DECREF(impl);
Py_XDECREF(mro);
Py_XDECREF(impl);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can stay DECREF, since impl can't be NULL here.

@methane methane merged commit f757b72 into python:master Mar 22, 2018
@miss-islington
Copy link
Contributor

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@methane methane deleted the bpo32999-direct-mro branch March 22, 2018 12:52
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 22, 2018
bpo-33018 (fc7df0e is not required
anymore.  Revert it except test case.
(cherry picked from commit f757b72)

Co-authored-by: INADA Naoki <[email protected]>
ilevkivskyi pushed a commit that referenced this pull request Mar 22, 2018
bpo-32999 too.  So fc7df0e is not required
anymore.  Revert it except test case.
(cherry picked from commit f757b72)

Co-authored-by: INADA Naoki <[email protected]>
zhangyangyu
assert(PyTuple_Check(mro));
for (pos = 0; pos < PyTuple_GET_SIZE(mro); pos++) {
PyObject *mro_item = PyTuple_GET_ITEM(mro, pos);
if (mro_item == NULL) {
Copy link
Member

@zhangyangyu zhangyangyu Mar 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@methane Late review, this check is redundant or not right. To keep it, you need to set an exception in the block, otherwise you are returning NULL without an exception, then SystemError.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. It should be assert(mro_item != NULL). I'll fix it tomorrow.

jo2y pushed a commit to jo2y/cpython that referenced this pull request Mar 23, 2018
bpo-33018 (fc7df0e is not required
anymore.  Revert it except test case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant