reactpy
reactpy copied to clipboard
Uvicorn is imported in common backend module
Current Situation
Currently Uvicorn gets imported in reactpy.backend._common. This is a problem because not all backends require uvicorn (e.g. Flask). Thus you can get an import error.
Proposed Actions
Make uvicorn a common dependency or import it in a try block.
I think this has happened before. We might consider just making this a common dependency.
I don't think it should be a common dependency, solely because reactpy can be installed without specifying any backends.
But I do think Uvicorn should be our default webserver for all reactpy.run calls, assuming a backend was specified during install.