File tree 2 files changed +1
-17
lines changed
2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change 15
15
16
16
17
17
def set_loop () -> None :
18
- """Attempt to use uvloop ."""
18
+ """Attempt to use different loop ."""
19
19
import asyncio
20
20
from asyncio .events import BaseDefaultEventLoopPolicy
21
21
22
- policy = None
23
-
24
22
if sys .platform == "win32" :
25
23
if hasattr (asyncio , "WindowsProactorEventLoopPolicy" ):
26
24
# pylint: disable=no-member
@@ -33,15 +31,7 @@ class ProactorPolicy(BaseDefaultEventLoopPolicy):
33
31
_loop_factory = asyncio .ProactorEventLoop
34
32
35
33
policy = ProactorPolicy ()
36
- else :
37
- try :
38
- import uvloop
39
- except ImportError :
40
- pass
41
- else :
42
- policy = uvloop .EventLoopPolicy ()
43
34
44
- if policy is not None :
45
35
asyncio .set_event_loop_policy (policy )
46
36
47
37
Original file line number Diff line number Diff line change 1
1
"""Set up some common test helper things."""
2
- import asyncio
3
2
import functools
4
3
import logging
5
- import os
6
4
from unittest .mock import patch
7
5
8
6
import pytest
26
24
mock_aiohttp_client ,
27
25
) # noqa: E402 module level import not at top of file
28
26
29
- if os .environ .get ("UVLOOP" ) == "1" :
30
- import uvloop
31
-
32
- asyncio .set_event_loop_policy (uvloop .EventLoopPolicy ())
33
27
34
28
logging .basicConfig (level = logging .DEBUG )
35
29
logging .getLogger ("sqlalchemy.engine" ).setLevel (logging .INFO )
You can’t perform that action at this time.
0 commit comments