theelous3 / asks

Async requests-like httplib for python.
MIT License
509 stars 63 forks source link

Bump anyio version #183

Closed cauebs closed 2 years ago

cauebs commented 3 years ago

It's pinned to ~2.0, but anyio is currently on 3.1.0.

theelous3 commented 3 years ago

test and pr? :D

cauebs commented 3 years ago

I might give it a go! Sounds like a fun contribution to make.

nosly commented 3 years ago

anyio 3 dropped support for curio, unless asks wants to follow, it has to stuck with anyio 2

fkusche commented 3 years ago

I vote for updating to anyio 3 (and dropping support for curio), because curio even requested that anyio drops support. See https://github.com/agronholm/anyio/issues/185

cauebs commented 2 years ago

Newer versions of FastAPI require newer versions of Starlette, which now requires AnyIO (^3). This means that if I have both asks and FastAPI I am forever locked on an unsupported version of the web server framework.

Problems like this are bound to become more frequent, since AnyIO is at the base of several projects, and I don't see anyone planning to support two versions of it simultaneously.

If anyone is defending the continued support for Curio, I have yet to see it.

wizpig64 commented 2 years ago

Problems like this are bound to become more frequent

Since another package, watchgod, released their 0.8 2 days ago, I have been unable to compile the requirements.txt for my main work project (I'm using the pip-tools architecture). It depends on both asks and uvicorn, and watchgod>=0.6 is a sub-requirement of uvicorn when you install it in the recommended way, as uvicorn[standard]. Since watchgod 0.8 requires anyio>=3.0.0,<4, and thus conflits with asks' requirement of anyio~=2.0, dependency compilation fails.

Pinning watchgod in my requirements.in file fixed the issue for now:

watchgod<0.8   # drop this line after https://github.com/theelous3/asks/issues/183

I hope this helps anyone else having this very specific issue right now, and serves as a data point that justifies upgrading asks.

Thanks for your time and effort.

theelous3 commented 2 years ago

I released asks 3,0.0 which supports new anyio