mirror of https://github.com/python/cpython
303aac8c56
I am re-submitting an older PR which was abandoned but is still relevant, #10783 by @timb07. The issue being solved () is still relevant. The original PR #10783 was closed as the final request changes were not applied and since abandoned. In this new PR I have re-used the original patch plus applied both comments from the review, by @maxking and @pganssle. For reference, here is the original PR description: In email.utils.parsedate_to_datetime(), a failure to parse the date, or invalid date components (such as hour outside 0..23) raises an exception. Document this behaviour, and add tests to test_email/test_utils.py to confirm this behaviour. In email.headerregistry.DateHeader.parse(), check when parsedate_to_datetime() raises an exception and add a new defect InvalidDateDefect; preserve the invalid value as the string value of the header, but set the datetime attribute to None. Add tests to test_email/test_headerregistry.py to confirm this behaviour; also added test to test_email/test_inversion.py to confirm emails with such defective date headers round trip successfully. This pull request incorporates feedback gratefully received from @bitdancer, @brettcannon, @Mariatta and @warsaw, and replaces the earlier PR #2254. Automerge-Triggered-By: GH:warsaw |
||
---|---|---|
.. | ||
2019-12-05-05-22-49.bpo-38976.5MG7Uu.rst | ||
2020-01-19-18-40-26.bpo-27321.8e6SpM.rst | ||
2020-05-04-12-16-00.bpo-40492.ONk9Na.rst | ||
2020-05-14-16-01-34.bpo-40592.Cmk855.rst | ||
2020-05-31-10-48-47.bpo-4356.P8kXqp.rst | ||
2020-07-08-09-45-00.bpo-16936.z8o8Pn.rst | ||
2020-08-19-08-32-13.bpo-41586.IYjmjK.rst | ||
2020-09-04-17-33-04.bpo-30681.LR4fnY.rst | ||
2020-09-08-23-41-29.bpo-41747.M6wLKv.rst | ||
2020-09-13-02-02-18.bpo-39337.L3NXTt.rst | ||
2020-09-22-11-07-50.bpo-41831.k-Eop_.rst | ||
2020-09-29-16-23-54.bpo-41876.QicdDU.rst | ||
2020-09-30-11-05-11.bpo-23706.dHTGjF.rst | ||
2020-10-01-21-11-03.bpo-41905._JpjR4.rst | ||
2020-10-03-23-14-50.bpo-41923.Buonw9.rst | ||
2020-10-08-18-22-28.bpo-41976.Svm0wb.rst | ||
2020-10-11-21-43-03.bpo-39101.-I49Pm.rst | ||
2020-10-12-21-21-24.bpo-42021.8yv_8-.rst | ||
2020-10-15-17-20-37.bpo-42043.OS0p_v.rst | ||
2020-10-16-07-45-35.bpo-35823.SNQo56.rst | ||
2020-10-16-16-08-04.bpo-28660.eX9pvD.rst | ||
2020-10-16-22-48-01.bpo-19270.jd_gkA.rst | ||
2020-10-17-07-52-53.bpo-41966.gwEQRZ.rst | ||
2020-10-17-23-17-18.bpo-42065.85BsRA.rst | ||
2020-10-19-14-02-09.bpo-41491.d1BUWH.rst | ||
2020-10-19-16-53-19.bpo-42089.R1dthW.rst | ||
2020-10-21-23-45-02.bpo-41052.3N7J2J.rst | ||
2020-10-23-08-54-47.bpo-41490.-Yk6OD.rst | ||
2020-10-25-19-25-02.bpo-42146.6A8uvS.rst | ||
2020-10-26-19-08-07.bpo-42157.Bdpa04.rst | ||
README.rst |
README.rst
Put news entry `blurb`_ files for the *Library* section in this directory. .. _blurb: https://pypi.org/project/blurb/