miguelgrinberg/microdot

Async server does not run on Python 3.12

bulletmark opened this issue · 1 comments

Using a generic simple example:

import asyncio
from microdot_asyncio import Microdot

app = Microdot()

@app.route('/')
async def hello(request):
    print('Got a request')
    return dict(result='ok')

app.run(debug=True)

On Linux, under Python versions 3.11 and earlier this works fine but on Python 3.12 app.run() returns immediately and the program terminates.

I'm raising this issue for the record although after looking at it somewhat it may be a Python bug related to this issue.

Thanks. I have put a workaround in place.