Skip to content

Conversation

zhangyangyu
Copy link
Member

No description provided.

@zhangyangyu zhangyangyu added type-bug An unexpected behavior, bug, or error needs backport to 2.7 labels Apr 14, 2017
@mention-bot
Copy link

@zhangyangyu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @serhiy-storchaka and @ezio-melotti to be potential reviewers.

while (1) {
PyObject *line = PyIter_Next(self);
PyObject *it, *line;
it = PyObject_GetIter(self);
Copy link
Member

Choose a reason for hiding this comment

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

This should be outside of the loop.

Copy link
Member Author

Choose a reason for hiding this comment

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

My foolish.

Misc/NEWS Outdated
- bpo-30068: _io._IOBase.readlines will check if it's closed first when
hint is present.

- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in
Copy link
Member

Choose a reason for hiding this comment

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

Would be better not move this entry.

return result;
}

it = PyObject_GetIter(self);
Copy link
Member

Choose a reason for hiding this comment

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

it is leaked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

}
Py_DECREF(it);
return result;
error:
Copy link
Member

Choose a reason for hiding this comment

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

Tiny nit: I prefer to add an empty line after return and before a label.

@zhangyangyu zhangyangyu merged commit 026435c into python:master Apr 15, 2017
@zhangyangyu zhangyangyu deleted the bpo-30068 branch April 15, 2017 04:47
zhangyangyu added a commit to zhangyangyu/cpython that referenced this pull request Apr 15, 2017
zhangyangyu added a commit to zhangyangyu/cpython that referenced this pull request Apr 15, 2017
zhangyangyu added a commit to zhangyangyu/cpython that referenced this pull request Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants