python-asgiref: bump to 3.11.1
authorAlexandru Ardelean <redacted>
Sat, 4 Apr 2026 17:34:52 +0000 (20:34 +0300)
committerAlexandru Ardelean <redacted>
Thu, 9 Apr 2026 05:00:48 +0000 (08:00 +0300)
Changelog: https://github.com/django/asgiref/blob/main/CHANGELOG.txt

Multiple minor/patch releases since 3.7.2 with bug fixes and
Python 3.13+ compatibility improvements. Resets PKG_RELEASE to 1.
Add test.sh to verify async_to_sync and sync_to_async adapters.

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

index d2ad9ae963081b30aa2782a2947eb0aa831901c6..69848879952db6c0e51c9d364ab344d05cddc3a0 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-asgiref
-PKG_VERSION:=3.7.2
-PKG_RELEASE:=2
+PKG_VERSION:=3.11.1
+PKG_RELEASE:=1
 
 PYPI_NAME:=asgiref
-PKG_HASH:=9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed
+PKG_HASH:=5f184dc43b7e763efe848065441eac62229c9f7b0475f41f80e207a114eda4ce
 
 PKG_BUILD_DEPENDS:=python-setuptools/host
 
diff --git a/lang/python/python-asgiref/test.sh b/lang/python/python-asgiref/test.sh
new file mode 100755 (executable)
index 0000000..9c43642
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+[ "$1" = python3-asgiref ] || exit 0
+python3 - << 'EOF'
+import asgiref
+assert asgiref.__version__, "asgiref version is empty"
+
+from asgiref.sync import async_to_sync, sync_to_async
+import asyncio
+
+async def async_add(a, b):
+    return a + b
+
+result = async_to_sync(async_add)(3, 4)
+assert result == 7, f"async_to_sync failed: {result}"
+
+def sync_mul(a, b):
+    return a * b
+
+async def run():
+    result = await sync_to_async(sync_mul)(6, 7)
+    assert result == 42, f"sync_to_async failed: {result}"
+
+asyncio.run(run())
+EOF
git clone https://git.99rst.org/PROJECT