litellm icon indicating copy to clipboard operation
litellm copied to clipboard

Don't depend on uvloop on windows

Open sparkprime opened this issue 7 months ago • 9 comments

Fixes #7731

sparkprime avatar Apr 16 '25 15:04 sparkprime

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2025 9:56pm

vercel[bot] avatar Apr 16 '25 15:04 vercel[bot]

This also needs conditional import logic like https://github.com/aviadr1/winuvloop/blob/main/winuvloop/init.py

However, the lint rule is failing because it looks like the regex is too strict?

Edit: never mind, fixed it.

sparkprime avatar Apr 16 '25 16:04 sparkprime

On second thoughts maybe it's better just to swap the uvloop dependency with winuvloop and let it do the logic?

sparkprime avatar Apr 16 '25 16:04 sparkprime

I found out that we don't even import uvloop on windows, so the fix is just to make the build-time dependency conditional on not being windows. As we don't need winloop, we don't need winuvloop either.

sparkprime avatar Apr 17 '25 15:04 sparkprime

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 22 '25 12:04 CLAassistant

This is ready to merge, thanks

sparkprime avatar Apr 23 '25 12:04 sparkprime

@ishaan-jaff Hi, this one-liner fixes the windows install, please can we merge?

sparkprime avatar Apr 24 '25 00:04 sparkprime

We are also interested in this PR being merged

abarahonar avatar Apr 24 '25 19:04 abarahonar

We are also interested in this PR being merged

Same here!

thomasbs17 avatar Apr 24 '25 20:04 thomasbs17

If you use uv to manage dependencies, there is another solution before this PR merged.

[tool.uv]
override-dependencies = ["uvloop;sys_platform != 'win32'"]

TomCzHen avatar Apr 29 '25 11:04 TomCzHen

@ishaan-jaff Hi again, there are a quite a lot of people using windows who are stuck on months-old versions of litellm without this fix, please can we merge? Thanks

sparkprime avatar Apr 30 '25 11:04 sparkprime

thanks @sparkprime, accepted !

ishaan-jaff avatar May 01 '25 21:05 ishaan-jaff