-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
I would enforce it. For example, constructing CleintSession
in a module global namespace is a bad smell and leads to hard-to-debug errors very often.
The plan is:
- Add
helpers.get_running_loop()
function with the following implementation:
def get_running_loop(loop=None):
if loop is None:
loop = asyncio.get_event_loop()
if not loop.is_running():
warnings.warn("The object should be created from async function",
DeprecationWarning,
stacklevel=3)
- Replace
asyncio.get_event_loop()
withget_running_loop()
in all aiohttp objects. - Replace a deprecation warning with
RuntimeError()
in aiohttp 4.0
vmarkovtsev, calendulish, avatar-lavventura, theAbdoSabbagh, Nunnito and 2 more
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers