Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-30681: Change error handling to return None in case of invalid date#2229

Closed
timb07 wants to merge 2 commits intopython:3.6python/cpython:3.6from
timb07:fix-issue-30681timb07/cpython:fix-issue-30681Copy head branch name to clipboard
Closed

bpo-30681: Change error handling to return None in case of invalid date#2229
timb07 wants to merge 2 commits intopython:3.6python/cpython:3.6from
timb07:fix-issue-30681timb07/cpython:fix-issue-30681Copy head branch name to clipboard

Conversation

@timb07
Copy link
Contributor

@timb07 timb07 commented Jun 16, 2017

In email.utils.parsedate_to_datetime(), check failure to parse date, or invalid date components (such as hour outside 0..23), and return None rather than raising an exception.

Add tests to confirm this behaviour.

@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!

@brettcannon
Copy link
Member

@timb07 would you mind changing the email example to not be sexual in nature? Otherwise we will have to reject this PR since we attempt to keep the code kid-friendly thanks to actually having kids playing with Python's source 😄

@Mariatta
Copy link
Member

In addition to @brettcannon's comment, please also make the change against the master branch.
It can be backported to 3.6 once the PR on master has been merged.
I'm closing this PR for now.
Please reopen the PR once the appropriate changes have been made, and we can review it.
Thanks.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.