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
bpo-37417: Fix error handling in bytearray.extend. #14407
bpo-37417: Fix error handling in bytearray.extend. #14407
Conversation
Thanks @brandtbucher for the PR, and @serhiy-storchaka for merging it |
I'm having trouble backporting to |
(cherry picked from commit 2a7d596) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-14408 is a backport of this pull request to the 3.7 branch. |
Thanks @serhiy-storchaka! Just a heads-up, it looks like the 3.8 backport timed out... |
Thanks @brandtbucher for the PR, and @serhiy-storchaka for merging it |
(cherry picked from commit 2a7d596) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
GH-14410 is a backport of this pull request to the 3.8 branch. |
Thank you for your contribution, @brandtbucher! |
bytearray.extend
doesn't properly handle errors that arise during iteration of the argument:As far as I can tell, this bug is present on all versions of Python 3. This patch adds a fix and a regression test.
https://bugs.python.org/issue37417