[New-bugs-announce] [issue37605] CI should not depend on gmane response
Terry J. Reedy
report at bugs.python.org
Tue Jul 16 11:49:35 EDT 2019
New submission from Terry J. Reedy <tjreedy at udel.edu>:
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.
----------
components: Tests
messages: 348023
nosy: pablogsal, terry.reedy, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: CI should not depend on gmane response
type: behavior
versions: Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37605>
_______________________________________
More information about the New-bugs-announce
mailing list