python-blinker: new package (1.9.0)
authorAlexandru Ardelean <redacted>
Mon, 23 Mar 2026 11:36:57 +0000 (11:36 +0000)
committerAlexandru Ardelean <redacted>
Tue, 31 Mar 2026 06:32:36 +0000 (09:32 +0300)
Flask 3.x requires blinker for its signal system. Add python-blinker
1.9.0 as a new package.

blinker is a pure-Python package (flit-core build backend) with no
runtime dependencies.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-blinker/Makefile [new file with mode: 0644]
lang/python/python-blinker/test.sh [new file with mode: 0644]

diff --git a/lang/python/python-blinker/Makefile b/lang/python/python-blinker/Makefile
new file mode 100644 (file)
index 0000000..29ea16c
--- /dev/null
@@ -0,0 +1,40 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-blinker
+PKG_VERSION:=1.9.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=blinker
+PKG_HASH:=b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_BUILD_DEPENDS:=python-flit-core/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-blinker
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Fast, simple object-to-object and broadcast signaling
+  URL:=https://blinker.readthedocs.io/
+  DEPENDS:=+python3-light
+endef
+
+define Package/python3-blinker/description
+Blinker provides fast, simple object-to-object and broadcast signaling
+for Python objects. It is used by Flask to implement its signal system.
+endef
+
+$(eval $(call Py3Package,python3-blinker))
+$(eval $(call BuildPackage,python3-blinker))
+$(eval $(call BuildPackage,python3-blinker-src))
diff --git a/lang/python/python-blinker/test.sh b/lang/python/python-blinker/test.sh
new file mode 100644 (file)
index 0000000..18d2efb
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+[ "$1" = python3-blinker ] || exit 0
+
+python3 - <<EOF
+import sys
+from blinker import Signal, signal
+
+# Named signal
+data_saved = signal("data-saved")
+results = []
+cb_named = lambda sender, **kw: results.append((sender, kw))
+data_saved.connect(cb_named)
+data_saved.send("db", value=42)
+assert results == [("db", {"value": 42})], f"Unexpected: {results}"
+
+# Anonymous signal, multiple subscribers
+updated = Signal()
+log = []
+cb_a = lambda s, **kw: log.append("a")
+cb_b = lambda s, **kw: log.append("b")
+updated.connect(cb_a)
+updated.connect(cb_b)
+updated.send(None)
+assert set(log) == {"a", "b"}, f"Unexpected: {log}"
+
+# Disconnect
+def handler(sender, **kw):
+    log.append("handler")
+
+updated.connect(handler)
+updated.disconnect(handler)
+updated.send(None)
+assert "handler" not in log[2:], "handler should have been disconnected"
+
+print("python-blinker OK")
+EOF
git clone https://git.99rst.org/PROJECT