mirror of
https://github.com/openwrt/packages.git
synced 2026-04-16 11:22:16 +00:00
Major version bump from 11.0.3 to 16.0. The legacy API (websockets.legacy.*) was removed in 14.0; the current public API (connect/serve in websockets.asyncio.*) is stable and backward-compatible since 12.0. Add test.sh that verifies core imports (frames, http11, datastructures). Changelog: https://websockets.readthedocs.io/en/stable/changelog.html Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
17 lines
430 B
Bash
Executable File
17 lines
430 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "$1" = python3-websockets ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
import websockets
|
|
from websockets.version import version
|
|
assert version, "websockets version is empty"
|
|
|
|
from websockets.frames import Frame, Opcode
|
|
from websockets.http11 import Request, Response
|
|
from websockets.datastructures import Headers
|
|
|
|
h = Headers([("Content-Type", "text/plain")])
|
|
assert h["Content-Type"] == "text/plain", "Headers lookup failed"
|
|
EOF
|