python: test with more modern versions (#19452)

Python 3.12 has been released in October 2023, it should be tested in
the CI.

Python 3.7 is not maintained anymore, removing it from the minimum
required version in `pyproject.toml` files.
This commit is contained in:
Jonathan Ballet
2024-09-18 10:53:51 +02:00
committed by GitHub
parent b3e72feaa9
commit 40967a3d38
228 changed files with 2355 additions and 2283 deletions

View File

@@ -1,19 +1,8 @@
# flake8: noqa
import asyncio
import random
def id_gen(bits=32):
""" Returns a n-bit randomly generated int """
return int(random.getrandbits(bits))
def async_test(f):
def wrapper(*args, **kwargs):
# coro = asyncio.coroutine(f)
coro = f
future = coro(*args, **kwargs)
loop = asyncio.get_event_loop()
loop.run_until_complete(future)
return wrapper