-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-26407: Do not mask errors in csv. #20536
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-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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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().
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
TypeError
incsv.reader()
,csv.writer.writerow()
andcsv.writer.writerows()
.https://bugs.python.org/issue26407