Barry A. Warsaw <ba...@python.org> added the comment:

Aside: I noticed that on _parseaddr.py:68, there's a bare `return`.  That 
should really be `return None` (EIBTI).  Can you fix that in your PR?

I think it's confusing to raise both TypeError and ValueError.  I suggest we 
check the `None` return from _parsedate_tz() and raise ValueError explicitly in 
that case, avoiding the implicit TypeError on the failing tuple unpack.

+1 on removing the mention of returning None from the documentation.  Then with 
the above, it would document raising ValueError on invalid date input.

As for backporting, I'm nosing Ned and Ɓukasz to weigh in.  Given that the 
patch is adding a new defect class (which it should), this won't break existing 
code, but it does mean that existing code would have different semantics 
depending on the patch version release of 3.9, 3.8, and 3.7.  I'm not 
completely comfortable with that, but let's see what the RMs say.  I guess I'm 
currently -0 on backporting.

----------
nosy: +lukasz.langa, ned.deily

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30681>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to