Skip to content
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-32255: Fix inconsistent behavior when csv.writer writes None #4769

Merged
merged 6 commits into from
Dec 12, 2017

Conversation

Licht-T
Copy link
Contributor

@Licht-T Licht-T commented Dec 9, 2017

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@Licht-T Licht-T changed the title bpo-32255: Fix inconsistent behavior when csv.writer writes "''" bpo-32255: Fix inconsistent behavior when csv.writer writes None Dec 11, 2017
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 besides a small style nitpick.

Please add a Misc/NEWS.d/ entry (manually or using the blurb tool, see the devguide) and add your name into Misc/ACKS.

def test_writerows_with_none(self):
with TemporaryFile("w+", newline='') as fileobj:
writer = csv.writer(fileobj)
writer.writerows([['a',None],[None,'d']])
Copy link
Member

Choose a reason for hiding this comment

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

Please add spaces after commas to conform PEP 8.

@Licht-T
Copy link
Contributor Author

Licht-T commented Dec 11, 2017

Thanks @serhiy-storchaka, fixed!

@@ -0,0 +1 @@
Fix inconsistent ``csv.writer`` behavior when it handles ``None``
Copy link
Member

@serhiy-storchaka serhiy-storchaka Dec 11, 2017

Choose a reason for hiding this comment

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

Add "Patch by Licht Takeuchi."

Copy link
Member

Choose a reason for hiding this comment

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

And don't forgot periods at the end of sentences.

@Licht-T
Copy link
Contributor Author

Licht-T commented Dec 11, 2017

@serhiy-storchaka Fixed!

@serhiy-storchaka serhiy-storchaka merged commit 2001900 into python:master Dec 12, 2017
@miss-islington
Copy link
Contributor

Thanks @Licht-T for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 12, 2017
…le. (pythonGH-4769)

This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900)
@bedevere-bot
Copy link

GH-4810 is a backport of this pull request to the 3.6 branch.

serhiy-storchaka pushed a commit that referenced this pull request Dec 12, 2017
…le. (GH-4769) (#4810)

This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants