python-async-timeout: update to 5.0.1
authorAlexandru Ardelean <redacted>
Sat, 4 Apr 2026 20:29:17 +0000 (23:29 +0300)
committerAlexandru Ardelean <redacted>
Thu, 9 Apr 2026 05:01:05 +0000 (08:01 +0300)
Update package to 5.0.1.

Add PYPI_SOURCE_NAME since PyPI switched sdist filename to use
underscores (async_timeout-5.0.1.tar.gz).

Add test.sh to verify timeout context manager functionality.

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

index f6d0a4c89633c278211355b7f04d2b7ed7e46543..6bb9d7a954150c87a114e240459e6211a18c7ccb 100644 (file)
@@ -8,11 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-async-timeout
-PKG_VERSION:=4.0.2
+PKG_VERSION:=5.0.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=async-timeout
-PKG_HASH:=2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15
+PYPI_SOURCE_NAME:=async_timeout
+PKG_HASH:=d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=Apache-2.0
@@ -30,7 +31,8 @@ define Package/python3-async-timeout
   URL:=https://github.com/aio-libs/async-timeout
   DEPENDS:= \
   +python3-light \
-  +python3-asyncio
+  +python3-asyncio \
+  +python3-logging
 endef
 
 define Package/python3-async-timeout/description
diff --git a/lang/python/python-async-timeout/test.sh b/lang/python/python-async-timeout/test.sh
new file mode 100644 (file)
index 0000000..03ac5ff
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+[ "$1" = python3-async-timeout ] || exit 0
+
+python3 - << 'EOF'
+import asyncio
+import async_timeout
+
+async def test_no_timeout():
+    async with async_timeout.timeout(10):
+        await asyncio.sleep(0)
+    print("no_timeout OK")
+
+async def test_timeout_fires():
+    try:
+        async with async_timeout.timeout(0.01):
+            await asyncio.sleep(1)
+        assert False, "Should have timed out"
+    except asyncio.TimeoutError:
+        print("timeout_fires OK")
+
+async def test_timeout_none():
+    async with async_timeout.timeout(None):
+        await asyncio.sleep(0)
+    print("timeout_none OK")
+
+async def main():
+    await test_no_timeout()
+    await test_timeout_fires()
+    await test_timeout_none()
+
+asyncio.run(main())
+EOF
git clone https://git.99rst.org/PROJECT