[issue38413] Remove or change "Multithreading" section
Change by David Kernan : -- keywords: +patch pull_requests: +16262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16678 ___ Python tracker <https://bugs.python.org/issue38413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38413] Remove or change "Multithreading" section
Change by David Kernan : -- pull_requests: -16262 ___ Python tracker <https://bugs.python.org/issue38413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38421] email.utils.parsetime_tz does not return "None"
Change by David Kernan : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue38421> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38421] email.utils.parsetime_tz does not return "None"
New submission from David Kernan : email.utils.parsetime_tz() is a function which attempts to parse a date, and returns a 10-item tuple. The first 9 items represents a time, and the last item represents the timezone offset from UTC. In Python 2, the original behavior was to return the date, and a "None" value when there was no timezone - this is documented here: https://docs.python.org/3/library/email.utils.html#email.utils.parsedate_tz In Python 3 however, the code specifically prevents "None" from being returned in place of a UTC offset: https://github.com/python/cpython/blob/3.7/Lib/email/_parseaddr.py#L53-#L54 The Python 3 documentation for email.utils.parsetime_tz() - is still the same as the 2.7 documentation, and specifically mentions that should a timezone be missing from the string, the last item will be "None" This isn't the case: Python 3.6.8: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, 0) Python 2.7.16: >>> import email.utils >>> date_string = 'Wed, 09 Oct 2019 08:32:37' >>> email.utils.parsedate_tz(date_string) (2019, 10, 9, 8, 32, 37, 0, 1, -1, None) --- Is this an error in code, or is it a mistake in the documentation? -- components: email messages: 354265 nosy: David Kernan, barry, r.david.murray priority: normal severity: normal status: open title: email.utils.parsetime_tz does not return "None" versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38421> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38421] email.utils.parsetime_tz does not return "None" as the tz offset
Change by David Kernan : -- title: email.utils.parsetime_tz does not return "None" -> email.utils.parsetime_tz does not return "None" as the tz offset ___ Python tracker <https://bugs.python.org/issue38421> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38421] email.utils.parsetime_tz does not return "None" as the tz offset
David Kernan added the comment: Ah yes, thanks, this does seem pretty intentional. I'll submit a PR for the documentation for this method for the affected version. -- ___ Python tracker <https://bugs.python.org/issue38421> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38421] email.utils.parsetime_tz does not return "None" as the tz offset
Change by David Kernan : -- assignee: -> docs@python components: +Documentation -email nosy: +docs@python ___ Python tracker <https://bugs.python.org/issue38421> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com