bpo-26407: Do not mask errors in csv.#20536
Conversation
Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows().
ff88d59 to
1f86347
Compare
aeros
left a comment
There was a problem hiding this comment.
I agree with directly raising other exceptions from __iter__ rather than suppressing them w/ TypeError, as it can easily obfuscate bugs. The more general discussion will likely have to take place somewhere like python-dev, but for now, I think changing csv.writerow() has a narrow enough scope.
+1, other than a comment/question on the C changes.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8, 3.9. |
|
GH-21047 is a backport of this pull request to the 3.9 branch. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Sorry @serhiy-storchaka, I had trouble checking out the |
Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows(). (cherry picked from commit c88239f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to |
Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows().
|
GH-24021 is a backport of this pull request to the 3.8 branch. |
Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows().. (cherry picked from commit c88239f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Unexpected errors in calling the
__iter__method are no longermasked by
TypeErrorincsv.reader(),csv.writer.writerow()andcsv.writer.writerows().https://bugs.python.org/issue26407