Skip to content
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

Fix for сlosing message formatting #289

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

jolaf
Copy link
Contributor

@jolaf jolaf commented Sep 17, 2024

Fixes #276.

@auvipy auvipy merged commit cb60792 into Lawouach:master Sep 18, 2024
0 of 6 checks passed
@auvipy
Copy link
Collaborator

auvipy commented Nov 3, 2024

we got a regression report for this change #292

and test_parse_unix_schemes (test.test_client.BasicClientTest) ... /home/runner/work/WebSocket-for-Python/WebSocket-for-Python/test/test_client.py:37: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
c = WebSocketBaseClient(url="wss+unix:///my.socket")
/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/case.py:605: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
testMethod()
ok
test_parse_ws_scheme (test.test_client.BasicClientTest) ... /opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/case.py:605: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 0)>
testMethod()
ok
test_parse_ws_scheme_when_missing_resource (test.test_client.BasicClientTest) ... ok
test_parse_ws_scheme_with_port (test.test_client.BasicClientTest) ... ok
test_parse_ws_scheme_with_query_string (test.test_client.BasicClientTest) ... ok
test_parse_wss_scheme (test.test_client.BasicClientTest) ... ok
test_parse_wss_scheme_when_missing_resource (test.test_client.BasicClientTest) ... ok
test_parse_wss_scheme_with_port (test.test_client.BasicClientTest) ... ok
test_parse_wss_scheme_with_query_string (test.test_client.BasicClientTest) ... ok
test_thread_is_started_once_connected (test.test_client.ThreadedClientTest) ... Exception in thread WebSocketClient:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 528, in run
if not self.once():
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 410, in once
if not self.process(self.buf[:requested]):
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 465, in process
logger.debug("Closing message received (%d): %s" % (s.closing.code, s.closing.reason.decode() if isinstance(s.closing.reason, bytes) else s.closing.reason))
TypeError: isinstance() arg 2 must be a type or tuple of types

ok
test_thread_is_started_once_connected_secure (test.test_client.ThreadedClientTest)
Same as the above test, but with SSL socket ... Exception in thread WebSocketClient:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 528, in run
if not self.once():
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 410, in once
if not self.process(self.buf[:requested]):
File "/home/runner/work/WebSocket-for-Python/WebSocket-for-Python/ws4py/websocket.py", line 465, in process
logger.debug("Closing message received (%d): %s" % (s.closing.code, s.closing.reason.decode() if isinstance(s.closing.reason, bytes) else s.closing.reason))
TypeError: isinstance() arg 2 must be a type or tuple of types

auvipy added a commit that referenced this pull request Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing message received – too many 's
2 participants