Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1718208

Summary: python-websockets fail to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-websocketsAssignee: Julien Enselme <jujens>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jujens
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-15 09:08:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1686977    

Description Miro Hrončok 2019-06-07 09:14:42 UTC
python-websockets 6.0-2.fc30 fail to build with Python 3.8.0b1:

...
test_server_create_protocol_function (websockets.test_client_server.ClientServerTests) ... ok
test_server_create_protocol_over_klass (websockets.test_client_server.ClientServerTests) ... /usr/lib64/python3.8/asyncio/locks.py:161: ResourceWarning: unclosed <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 41373), raddr=('127.0.0.1', 55054)>
  self._waiters = collections.deque()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib64/python3.8/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=9>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Exception ignored in: <generator object WebSocketCommonProtocol.close_connection at 0x7fcdaad78dd0>
Traceback (most recent call last):
  File "/builddir/build/BUILD/websockets-6.0/websockets/protocol.py", line 853, in close_connection
    self.writer.close()
  File "/usr/lib64/python3.8/asyncio/streams.py", line 708, in close
    return self._transport.close()
  File "/usr/lib64/python3.8/asyncio/selector_events.py", line 680, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "/usr/lib64/python3.8/asyncio/base_events.py", line 711, in call_soon
    self._check_closed()
  File "/usr/lib64/python3.8/asyncio/base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
ok
test_server_does_not_switch_protocols (websockets.test_client_server.ClientServerTests) ... /builddir/build/BUILD/websockets-6.0/websockets/test_client_server.py:842: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def wrong_read_response(stream):
ok
test_server_error_in_handshake (websockets.test_client_server.ClientServerTests) ... ok
test_server_handler_crashes (websockets.test_client_server.ClientServerTests) ... ok
test_server_klass (websockets.test_client_server.ClientServerTests) ... ok
test_server_receives_malformed_request (websockets.test_client_server.ClientServerTests) ... ok
test_server_sends_invalid_handshake_response (websockets.test_client_server.ClientServerTests) ... ok
test_server_shuts_down_during_connection_close (websockets.test_client_server.ClientServerTests) ... FAIL

[hangs here]


Full logs at https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-websockets/



This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. The fix should be pushed on the master branch and no release bump is required.

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

If you don't have free cycles to dedicate fixing your package, notify us and we'll try to provide some pointers. Let us know if we can push a fix directly without a pull request, in the case we happen to have one before you do.

We recommend always consulting with upstream, chances are this is already fixed there.

Comment 1 Miro Hrončok 2019-07-10 14:40:37 UTC
Please respond.

Comment 2 Julien Enselme 2019-07-13 17:13:22 UTC
I updated to 8.0 on rawhide (this fixed the issue with the hanging test) and made a patch to skip the tests (because many fail). They fail because Python 3.8 raise new DeprecationWarnings and the tests check how many are raised. Related issue on upstream repo: https://github.com/aaugustin/websockets/issues/648

Comment 3 Miro Hrončok 2019-07-15 09:08:48 UTC
Thanks.