Kludex / fastapi-tips

FastAPI Tips by The FastAPI Expert!
1.96k stars 74 forks source link

uvloop is not supported on windows #7

Closed the-code-rider closed 5 months ago

the-code-rider commented 5 months ago

issue

i tried installing uvloop on my machine windows 11; python 3.10.0. i have added the error message in the screenshot. it was bit of a bummer, considering that this is the first tip and is not supported in windows. while i can probably install it while building the docker image, i don't want to keep docker and local setup different.

image

suggested solution

should we perhaps add a warning in the doc, or will it look ugly/unnecessary?

Kludex commented 5 months ago

Well... I usually forget Windows users. 😬

Maybe a warning like:

[!WARNING] uvloop can't be installed on Windows. If you use Windows locally, but Linux based system on production, you can use an environment marker to not install uvloop on Windows e.g. uvloop; sys_platform != 'win32'.

PR welcome.

the-code-rider commented 5 months ago

submitted a pr https://github.com/Kludex/fastapi-tips/pull/8

on a lighter note:

hidethepain