Conflicts between bocadillo and websockets
NeolithEra opened this issue · 2 comments
Hi, users are unable to run bocadillo due to dependency conflict with websockets package.
As shown in the following full dependency graph of bocadillo, bocadillo requires websockets>=6.0 ,while uvicorn requires websockets==7.*.
According to pip’s “first found wins” installation strategy, websockets==8.0.1 is the actually installed version.
However, websockets==8.0.1 does not satisfy websockets==7.*.
Dependency tree-----
bocadillo(version range:)
| +-aiodine(version range:<2.0,>=1.2.5)
| +-jinja2(version range:>=2.10.1)
| +-python-multipart(version range:)
| | +-six(version range:>=1.4.0)
| +-requests(version range:)
| +-starlette(version range:>=0.12.2,<0.13)
| +-typesystem(version range:>=0.2.2)
| +-uvicorn(version range:>=0.7,<0.9)
| | +-click(version range:==7.)
| | +-h11(version range:==0.8.)
| | +-websockets(version range:==7.)
| | +-httptools(version range:==0.0.13sys)
| | +-uvloop(version range:==0.12.sys)
| +-websockets(version range:>=6.0)
| +-whitenoise(version range:)
Thanks for your help.
Best,
Neolith
Solution
Fix your direct dependency to be websockets>=6.0,<8. I have checked this revision will not affect your downstream projects now.
@florimondmanca Could you help me review this issue? I can submit a PR to solve this issue.
Hi, thanks for reporting!
According to pip’s “first found wins” installation strategy
Ooh, I actually wasn’t aware of this. :-)
Fix your direct dependency to be websockets>=6.0,<8.
I’m thinking, since uvicorn actually requires a specific version of websockets, and I think we don’t actually have a constraint on its versions on our side, we can probably drop the dependency specification altogether and use whichever version uvicorn installs. This will prevent this issue from happening again once websockets turns 0.9.x and uvicorn wants to enforce it.
Could you help me review this issue? I can submit a PR to solve this issue.
With great pleasure! Feel free to submit a PR and I’ll take a look at it. Thanks!