Author terry.reedy
Recipients pablogsal, terry.reedy, vstinner
Date 2019-07-16.15:49:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On Travis, 'Documentation tests' passing is apparently required.  Line 23 of nntplib.rst is ">>> s = NNTP('')"  I use gmane and occasional failures to respond are routine.  Being able to merge should not depend on this external site.

In addition to a real failure, the following happen on PR 14675 earlier today.

Warning, treated as error:
File "library/nntplib.rst", line ?, in default
Failed example:
    s = NNTP('')
Exception raised:
    Traceback (most recent call last):
      File "/home/travis/build/python/cpython/Lib/", line 1328, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[0]>", line 1, in <module>
        s = NNTP('')
      File "/home/travis/build/python/cpython/Lib/", line 1050, in __init__
        _NNTPBase.__init__(self, file, host,
      File "/home/travis/build/python/cpython/Lib/", line 331, in __init__
        self.welcome = self._getresp()
      File "/home/travis/build/python/cpython/Lib/", line 456, in _getresp
        raise NNTPTemporaryError(resp)
    nntplib.NNTPTemporaryError: 400 load at 16.59, try later

Try later is what I do.  This exception should somehow be skipped.  I don't know anything about Travis and doctest tests and how flakey doctests are supposed to be handled. If nothing else, put the whole example is a try-except block?

>>> try:  # News sites can fail to respond.
...     s = NNTP('')
...     ...
... except: # If site failure, try later.
...     pass

Since output varies, I presume output checking is suppressed.
Date User Action Args
2019-07-16 15:49:35terry.reedysetrecipients: + terry.reedy, vstinner, pablogsal
2019-07-16 15:49:35terry.reedysetmessageid: <>
2019-07-16 15:49:35terry.reedylinkissue37605 messages
2019-07-16 15:49:35terry.reedycreate