Considering "async" functions from PyProject directives

Schimon Jehudah via Python-list <[email protected]> Tue, 13 Jan 2026 15:18:55 +0200
Newsgroups gmane.comp.python.general
Message-ID <[email protected]>
Greetings.

I have recently updated to Python 3.14 version.


Change of code of async loop
----------------------------

Now, in order to start an async task, I have to change this code.

loop = asyncio.get_event_loop()
loop.create_task(SlixfeedServiceIpc.server())

To this code.

loop = asyncio.get_running_loop()
SlixfeedServiceIpc.server(loop)
asyncio.run(asyncio.Event().wait())

Yet, for that change to apply, I have to classify the function
"start()" of that code to "async".


Problem
-------

However, this is not possible, because it is initiated by PyProject.

slixfeed-server = "slixfeed.script.server:start"


Solution
--------

So, I have to create a synchronous function, to call to that function
"start()" with this directive "asyncio.run(start())".


Question
--------

Would not it be good to allow to directly start async functions from
PyProject?


Kind regards,
Schimon