Skip to content

Conversation

@orenmn
Copy link
Contributor

@orenmn orenmn commented Sep 29, 2017

I removed (from the original PR) the test that verifies that the assertion failure is no more, because in 2.7, the code assumes that the value returned by splitlines() is a string, and uses it without asserting it is a string, in such a way that causing some error (for testing purposes) is not simple (at least i didn't find a simple way).
ISTM that the first test is good enough to verify that the splitlines() attribute is ignored, and PyUnicode_Splitlines() is used directly.

https://bugs.python.org/issue31285

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. Could you please squash the commits and write correct commit message?

@orenmn
Copy link
Contributor Author

orenmn commented Sep 30, 2017

I tried to follow the guidelines in https://devguide.python.org/gitbootcamp/#accepting-and-merging-a-pull-request.
Hope that's what you meant..

@serhiy-storchaka
Copy link
Member

This is no assertion in 2.7, isn't?

@orenmn
Copy link
Contributor Author

orenmn commented Sep 30, 2017

No assertion in 2.7, but i thought that it is required that the title is the same as the one we backport from. I would fix that.

…) in case __loader__.get_source() has a bad splitlines() method. (pythonGH-3219)
@orenmn orenmn force-pushed the bpo31285-backport27 branch from 2169500 to c15236b Compare September 30, 2017 10:17
@serhiy-storchaka serhiy-storchaka merged commit 40d736b into python:2.7 Sep 30, 2017
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.

5 participants