python-flask-socketio: bump to 5.6.1

Requires python-socketio >= 5.12.0 and python-engineio >= 4.11.0,
both bumped in preceding commits.

Also fix test.sh to use importlib.metadata for version check
since flask_socketio no longer exposes __version__ directly.

Link: https://github.com/miguelgrinberg/Flask-SocketIO/blob/main/CHANGES.md
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2026-03-29 13:35:58 +00:00
committed by Alexandru Ardelean
parent e2b96c3802
commit f5e7a07572
2 changed files with 41 additions and 2 deletions

View File

@@ -8,17 +8,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=python-flask-socketio
PKG_VERSION:=5.5.1
PKG_VERSION:=5.6.1
PKG_RELEASE:=1
PYPI_NAME:=Flask-SocketIO
PYPI_SOURCE_NAME:=flask_socketio
PKG_HASH:=d946c944a1074ccad8e99485a6f5c79bc5789e3ea4df0bb9c864939586c51ec4
PKG_HASH:=fe5bd995c3ed4da9a98f335d0d830fa1a19d84a64789f6265642a671fdacaeac
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=python-setuptools/host
include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk

View File

@@ -0,0 +1,37 @@
#!/bin/sh
[ "$1" = python3-flask-socketio ] || exit 0
python3 - <<EOF
import sys
from flask import Flask
from flask_socketio import SocketIO, emit
from importlib.metadata import version
pkg_version = version("flask-socketio")
if pkg_version != "$2":
print("Wrong version: " + pkg_version)
sys.exit(1)
app = Flask(__name__)
app.config["SECRET_KEY"] = "test-secret"
socketio = SocketIO(app)
@socketio.on("ping")
def handle_ping(data):
emit("pong", {"msg": data["msg"]})
client = socketio.test_client(app)
assert client.is_connected()
client.emit("ping", {"msg": "hello"})
received = client.get_received()
assert len(received) == 1
assert received[0]["name"] == "pong"
assert received[0]["args"][0]["msg"] == "hello"
client.disconnect()
assert not client.is_connected()
print("python-flask-socketio OK")
EOF