chore: drop async-timeout dependency on Python >= 3.11 (#132)
This commit is contained in:
parent
2646bc2e04
commit
1b5c9e1cb9
@ -25,7 +25,7 @@ packages = [
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.7"
|
||||
async-timeout = ">=3.0.0"
|
||||
async-timeout = {version = ">=3.0.0", python = "<3.11"}
|
||||
|
||||
# Documentation Dependencies
|
||||
sphinxcontrib-asyncio = {version = "^0.3.0", optional = true}
|
||||
|
||||
@ -2,12 +2,16 @@ import array
|
||||
import asyncio
|
||||
import logging
|
||||
import socket
|
||||
import sys
|
||||
import traceback
|
||||
from collections import deque
|
||||
from copy import copy
|
||||
from typing import Any, Optional
|
||||
|
||||
import async_timeout
|
||||
if sys.version_info[:2] < (3, 11):
|
||||
from async_timeout import timeout as asyncio_timeout
|
||||
else:
|
||||
from asyncio import timeout as asyncio_timeout
|
||||
|
||||
from .. import introspection as intr
|
||||
from .._private.unmarshaller import Unmarshaller
|
||||
@ -268,7 +272,7 @@ class MessageBus(BaseMessageBus):
|
||||
|
||||
super().introspect(bus_name, path, reply_handler)
|
||||
|
||||
async with async_timeout.timeout(timeout):
|
||||
async with asyncio_timeout(timeout):
|
||||
return await future
|
||||
|
||||
async def request_name(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user