-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI should not depend on gmane response #81786
Comments
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. |
Python test suite uses many external services: You should all be skipped if the "network" resource is not used, which is the default. Many tests were modified to catch network failures and ignore the test in this case. test_nntplib is known to be very fragile: it doesn't handle network issues. I would suggest to remove functional tests which depend on external servers, since these tests fail often and nobody seems to care of test_nntplib. |
Victor, note that this issue is about the nntplib doctests in Doc/library/nntplib.rst. I agree that any examples in that file that actually hit an external server should be marked as not doctests. |
gmane was down awhile yesterday, so another merge (temporarily) blocked because of this. If either of you knows how to fix this, please do so. |
is it allowed to mock news.gmane.org response? if it is okay i would like to help |
For doctests, I would prefer to just disable some or all of the doctests in Doc/library/nntplib.rst rather than go to the effort of trying to mock things. |
In other news, news.gmane.org is now news.gmane.io; see also https://bugs.python.org/issue39343 |
nntp.rst, line 23, has already been updated to "s = NNTP('news.gmane.io'). But that also occasionally fails to respond. I have not seen any test failures recently, so maybe something else has changes. Should this be closed pending current failures? |
One year later:
Yes, let's close and re-open if necessary.
Yes, if it comes up again, that sounds sensible, especially given the nntplib module is deprecated in 3.11 and set for removal in 3.13 (see PEP 594 – Removing dead batteries from the standard library and #91217). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: