This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1563292175.7.0.185090199306.issue37605@roundup.psfhosted.org>
In-reply-to
Content
On Travis, 'Documentation tests' passing is apparently required.  Line 23 of nntplib.rst is ">>> s = NNTP('news.gmane.org')"  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.

https://travis-ci.org/python/cpython/jobs/559289634

Warning, treated as error:
**********************************************************************
File "library/nntplib.rst", line ?, in default
Failed example:
    s = NNTP('news.gmane.org')
Exception raised:
    Traceback (most recent call last):
      File "/home/travis/build/python/cpython/Lib/doctest.py", line 1328, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest default[0]>", line 1, in <module>
        s = NNTP('news.gmane.org')
      File "/home/travis/build/python/cpython/Lib/nntplib.py", line 1050, in __init__
        _NNTPBase.__init__(self, file, host,
      File "/home/travis/build/python/cpython/Lib/nntplib.py", line 331, in __init__
        self.welcome = self._getresp()
      File "/home/travis/build/python/cpython/Lib/nntplib.py", 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('news.gmane.org')
...     ...
... except: # If site failure, try later.
...     pass

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