Support older winloop
This commit is contained in:
@@ -45,3 +45,4 @@ repos:
|
||||
- types-aiofiles
|
||||
- typing-extensions<5
|
||||
- uvloop<0.20; implementation_name == "cpython" and (sys_platform == "darwin" or sys_platform == "linux")
|
||||
- winloop<0.1.3; python_version >= "3.9" and implementation_name == "cpython" and (sys_platform == 'cygwin' or sys_platform == 'win32')
|
||||
|
||||
Generated
+1
-1
@@ -1363,4 +1363,4 @@ termux = []
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.8"
|
||||
content-hash = "e8befa5123d461caf3f35fb9b730b3d79228feecc87e19c8f40d87c94ed4c9c7"
|
||||
content-hash = "2c02e97c6fb8fa9e4fc5752a9077d39c0a33b7e0dda14a1df26c233355d7bc87"
|
||||
|
||||
@@ -40,7 +40,11 @@ def set_event_loop_policy() -> None:
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
|
||||
try:
|
||||
policy = winloop.EventLoopPolicy()
|
||||
except AttributeError:
|
||||
policy = winloop.WinLoopPolicy()
|
||||
asyncio.set_event_loop_policy(policy)
|
||||
return
|
||||
elif sys.platform in {"darwin", "linux"}:
|
||||
try:
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ rich = ">=12.3,<14"
|
||||
tomli = { version = "<3", python = "<3.11" }
|
||||
typing-extensions = "^4.10"
|
||||
uvloop = { version = ">=0.14,<0.20", optional = true, markers = "implementation_name == 'cpython' and (sys_platform == 'darwin' or sys_platform == 'linux')" }
|
||||
winloop = { version = ">=0.1", python = ">=3.9", markers = "implementation_name == 'cpython' and (sys_platform == 'cygwin' or sys_platform == 'win32')" }
|
||||
winloop = { version = "<0.1.3", python = ">=3.9", markers = "implementation_name == 'cpython' and (sys_platform == 'cygwin' or sys_platform == 'win32')" }
|
||||
|
||||
[tool.poetry.extras]
|
||||
non-termux = ["aiodns", "uvloop"]
|
||||
|
||||
Reference in New Issue
Block a user