Skip to content

Commit 1e88f18

Browse files
author
Vadim Buga
committed
20220201 _2 a fix from tornadoweb/tornado#2751
1 parent 8e9dac5 commit 1e88f18

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

AIOHTTPTest1/notes

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ PostgreSQL init process complete; ready for start up.
9898

9999
(aiohttptest1) PS C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\polls> py aiohttpdemo_polls\main.py
100100
unhandled exception during asyncio.run() shutdown
101-
task: <Task finished name='Task-1' coro=<_run_app() done, defined at C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiohttp\web.py:287> exception=NotImplementedError()>
101+
task: <Task finished name='Task-1' coro=<_run_app() done, defined at C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiohttp\web.py:287> exception=NotImplementedError()>
102102
Traceback (most recent call last):
103103
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiohttp\web.py", line 514, in run_app
104104
loop.run_until_complete(main_task)
@@ -116,7 +116,7 @@ Traceback (most recent call last):
116116
await receiver(*args, **kwargs) # type: ignore
117117
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiohttp\web_app.py", line 539, in _on_startup
118118
await it.__anext__()
119-
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\polls\aiohttpdemo_polls\db.py", line 33, in pg_context
119+
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\polls\aiohttpdemo_polls\db.py", line 35, in pg_context
120120
engine = await aiopg.sa.create_engine(
121121
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\sa\engine.py", line 94, in _create_engine
122122
pool = await aiopg.create_pool(
@@ -150,7 +150,7 @@ Traceback (most recent call last):
150150
await receiver(*args, **kwargs) # type: ignore
151151
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiohttp\web_app.py", line 539, in _on_startup
152152
await it.__anext__()
153-
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\polls\aiohttpdemo_polls\db.py", line 33, in pg_context
153+
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\polls\aiohttpdemo_polls\db.py", line 35, in pg_context
154154
engine = await aiopg.sa.create_engine(
155155
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\sa\engine.py", line 94, in _create_engine
156156
pool = await aiopg.create_pool(
@@ -160,12 +160,11 @@ Traceback (most recent call last):
160160
conn = await connect(
161161
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\connection.py", line 65, in connect
162162
connection = Connection(
163-
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\connection.py", line 772, in __init__
164-
self._loop.add_reader(
165-
File "C:\Users\codec\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 501, in add_reader
163+
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-pac line 501, in add_reader
164+
line 501, in add_reader
166165
raise NotImplementedError
167166
NotImplementedError
168-
Exception ignored in: <function Connection.__del__ at 0x000002740CCF78B0>
167+
Exception ignored in: <function Connection.__del__ at 0x0000016C93A5C160>
169168
Traceback (most recent call last):
170169
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\connection.py", line 1188, in __del__
171170
File "C:\Users\codec\Documents\_MY_\git\gh_ghcodetyper\python_experiments\AIOHTTPTest1\.envs\aiohttptest1\lib\site-packages\aiopg\connection.py", line 995, in close

AIOHTTPTest1/polls/aiohttpdemo_polls/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# aiohttpdemo_polls/main.py
2+
3+
4+
import sys
5+
import asyncio
6+
7+
if sys.platform == 'win32':
8+
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
9+
210
from aiohttp import web
311

412
from settings import config

0 commit comments

Comments
 (0)