Files
packages/lang/python/python-websocket-client/test.sh
Alexandru Ardelean 961b94904a python-websocket-client: bump to 1.9.0
Changes since 1.7.0:
- v1.8.0: Add support for custom socket options and improved
  proxy handling
- v1.9.0: Fix compatibility with Python 3.12+ deprecations
- Various bug fixes for connection handling and error reporting

Also add test.sh to verify version and core API imports.

Link: https://github.com/websocket-client/websocket-client/blob/master/ChangeLog
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-01 10:29:27 +03:00

37 lines
722 B
Bash
Executable File

#!/bin/sh
[ "$1" = "python3-websocket-client" ] || exit 0
python3 - << EOF
import sys
import websocket
if websocket.__version__ != "$2":
print("Wrong version: " + websocket.__version__)
sys.exit(1)
# Verify core API is importable
from websocket import (
WebSocket,
WebSocketApp,
WebSocketConnectionClosedException,
WebSocketTimeoutException,
WebSocketBadStatusException,
create_connection,
enableTrace,
)
# WebSocket can be instantiated (without connecting)
ws = WebSocket()
assert ws is not None
# WebSocketApp can be instantiated with just a URL
app = WebSocketApp("ws://localhost:9999")
assert app is not None
# Trace toggle does not raise
enableTrace(False)
sys.exit(0)
EOF