Skip to content

[2.7] bpo-31285: fix an assertion failure and a SystemError in warnings.warn_explicit (GH-3219) #3805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

orenmn
Copy link
Contributor

@orenmn orenmn commented Sep 28, 2017

This is a backport of #3219 , but actually also a backport of #3803 , which is a cleanup after #3219 .

Also, i removed 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

@orenmn
Copy link
Contributor Author

orenmn commented Sep 29, 2017

Serhiy and I agreed on another solution (https://bugs.python.org/issue31285#msg303308), so i would open another PR, this time with a sensible branch name.

@orenmn orenmn closed this Sep 29, 2017
@orenmn orenmn deleted the bpo31478-backport27 branch September 29, 2017 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants