-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
test_2_KeyboardInterrupt failing on Python 3.5 #1406
Comments
Original comment by Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco): The error seems to be related to how connections are retried now. I'm not sure why a call to I'm tempted in the test to just be more lenient and catch that error as well. |
Original comment by Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco): I tried replicating the failure using a simple http server that disconnects on request:
And calling it simply with the client:
But that doesn't fail. I'm now starting to think that the monkeypatch of putrequest on the HTTPConnection in webtest may be at fault. |
Original comment by Anonymous: I'm packaging CherryPy into Fedora and I've encountered the very same test failure when building against python 3.5 (for upcoming fedora24). Here's the buildlog: https://copr-be.cloud.fedoraproject.org/results/torsava/python3-cherrypy/fedora-rawhide-x86_64/00163068-python3-cherrypy/build.log.gz Note that this is after I've already applied a patch made from pull request #120 that successfully solves issue #1382. |
Original comment by Joel Rivera (Bitbucket: cyraxjoe, GitHub: cyraxjoe): The issue caused because of a new exception on the I have a fix for this issue on my fork. Which I'll probably integrate the change to |
Original comment by Anonymous: @cyraxjoe With the patch from your fork, CherryPy now successfully builds against Python 3.5 in Fedora 24, thanks for your work! |
Original comment by Joel Rivera (Bitbucket: cyraxjoe, GitHub: cyraxjoe): Add new argument to openURL for the testsuite to be able to This fixes the KeyboardError problem for 3.5 by specifying that The longer explanation of the fix:
Fixes issue #1406. |
raise subclasses of socket.error (since python3.3 OSError) instead of retrying. This fixes the KeyboardError problem for 3.5 by specifying that subclasses of BadStatusLine can be raised. The longer explanation of the fix: From python3.5 a new exception is retuned when the connection ends abruptly: http.client.RemoteDisconnected RemoteDisconnected is a subclass of: (ConnectionResetError, http.client.BadStatusLine) and ConnectionResetError is an indirect subclass of: OSError From python 3.3 an up socket.error is an alias to OSError following PEP-3151, therefore http.client.RemoteDisconnected is considered a socket.error. raise_subcls specifies the classes that are not going to be considered as a socket.error for the retries. Given that RemoteDisconnected is part BadStatusLine we can use the same call for all py3 versions without sideffects. python < 3.5 will raise directly BadStatusLine which is not a subclass for socket.error/OSError. Fixes issue #1406.
Originally reported by: Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco)
The text was updated successfully, but these errors were encountered: