Files
Alexandru Ardelean 1d8ab824ce 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>
2026-04-01 10:29:27 +03:00

25 lines
430 B
Bash
Executable File

#!/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