mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 10:51:55 +00:00
python-sniffio: bump to 1.3.1
Changes since 1.3.0: - Fix compatibility with Python 3.12+ by updating deprecated asyncio internals usage Also add test.sh to verify version and asyncio library detection. Link: https://github.com/python-trio/sniffio/blob/master/CHANGELOG.rst Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
ba7acd594d
commit
1d8ab824ce
@@ -8,15 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=python-sniffio
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.3.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PYPI_NAME:=sniffio
|
||||
PKG_HASH:=e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101
|
||||
PKG_HASH:=f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc
|
||||
|
||||
PKG_LICENSE:=Apache-2.0 MIT
|
||||
PKG_LICENSE_FILES:=LICENSE.APACHE2 LICENSE.MIT
|
||||
PKG_MAINTAINER:=Julien Malik <julien.malik@paraiso.me>
|
||||
PKG_BUILD_DEPENDS:=python-setuptools/host python-setuptools-scm/host
|
||||
|
||||
include ../pypi.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
24
lang/python/python-sniffio/test.sh
Executable file
24
lang/python/python-sniffio/test.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = "python3-sniffio" ] || exit 0
|
||||
|
||||
python3 - << EOF
|
||||
import sys
|
||||
import sniffio
|
||||
|
||||
if sniffio.__version__ != "$2":
|
||||
print("Wrong version: " + sniffio.__version__)
|
||||
sys.exit(1)
|
||||
|
||||
from sniffio import current_async_library
|
||||
from sniffio import AsyncLibraryNotFoundError
|
||||
|
||||
# Outside async context should raise
|
||||
try:
|
||||
current_async_library()
|
||||
sys.exit(1)
|
||||
except AsyncLibraryNotFoundError:
|
||||
pass
|
||||
|
||||
sys.exit(0)
|
||||
EOF
|
||||
Reference in New Issue
Block a user