Re: [Django] #34737: SynchronousOnlyOperation is raised for non-running event loops on Python 3.7+. (was: Python 3.10 compatibility changes to utils/asyncio.py raise SynchronousOnlyOperation for non-running event loops on python >= 3.7)

11 views
Skip to first unread message

Django

unread,
Jul 25, 2023, 12:07:37 AM7/25/23
to django-...@googlegroups.com
#34737: SynchronousOnlyOperation is raised for non-running event loops on Python
3.7+.
-----------------------------+--------------------------------------
Reporter: wbastian-bh | Owner: nobody
Type: Bug | Status: closed
Component: Utilities | Version: 3.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Thanks for the report, however according to
[https://docs.python.org/3/library/asyncio-
eventloop.html#asyncio.get_running_loop Python docs]
`asyncio.get_running_loop()`:
> ''"Return the running event loop in the current OS thread.''
> ''Raise a RuntimeError if there is no running event loop."''
If `asyncio.get_running_loop()` returns a non-running event loop for you,
I'd consider this an issue in Python, not in Django itself.

--
Ticket URL: <https://code.djangoproject.com/ticket/34737#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages