-
-
Notifications
You must be signed in to change notification settings - Fork 540
Tests are broken on Python 3.8 #648
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
Comments
https://bugs.python.org/issue24885 comes back and bites me here... |
I asked for clarifications about these undocumented, backwards-incompatible changes in Python: https://bugs.python.org/issue37639 |
For reference, The |
I am running in prod now with python-3.8b4 and everything works well, fyi. When I run tests I get this other warning btw.
|
I am still encountering this Python 3.8.0~rc1 , with v8.0.2, and I dont see anything on master which would have fixed this. In addition to the deprecation warnings breaking the tests, there are two other failures I am encountering - same test method ======================================================================
FAIL: test_server_shuts_down_during_connection_close (tests.test_client_server.ClientServerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 299, in stop_client
self.loop.run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 114, in _decorate
return func(self, *_args, **_kwargs)
File "/usr/lib/python3.8/unittest/mock.py", line 1342, in patched
return func(*newargs, **newkeywargs)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 1205, in test_server_shuts_down_during_connection_close
self.assertEqual(reply, "Hello!")
File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 333, in temp_client
yield
File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 101, in temp_test_client
test.stop_client()
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 303, in stop_client
self.fail("Client failed to stop")
AssertionError: Client failed to stop
======================================================================
FAIL: test_server_shuts_down_during_connection_close (tests.test_client_server.SecureClientServerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 299, in stop_client
self.loop.run_until_complete(
File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
return future.result()
File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 114, in _decorate
return func(self, *_args, **_kwargs)
File "/usr/lib/python3.8/unittest/mock.py", line 1342, in patched
return func(*newargs, **newkeywargs)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 1205, in test_server_shuts_down_during_connection_close
self.assertEqual(reply, "Hello!")
File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 333, in temp_client
yield
File "/usr/lib/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 101, in temp_test_client
test.stop_client()
File "/home/abuild/rpmbuild/BUILD/websockets-8.0.2/tests/test_client_server.py", line 303, in stop_client
self.fail("Client failed to stop")
AssertionError: Client failed to stop |
@jayvdb This test no longer made sense since 7.0 I removed it. |
From what I saw, many tests break on Python 3.8 beta (118 as time of writing) because new
DeprecationWarning
are raised. One I spotted is class 'websockets.protocol.WebSocketCommonProtocol'> should be instaniated by asyncio internals only, please avoid its creation from user code which is not reported on Python 3.7. This causes the assertions on how many warnings are logged to fail.I tested on the current
master
branch.Since Python 3.8 is still in beta, I don't think this is urgent. I should be able to help on that if you want.
Original report: https://bugzilla.redhat.com/show_bug.cgi?id=1718208
The text was updated successfully, but these errors were encountered: