Sanic: Uvicorn and Sanic have incompatible websockets dependencies

Created on 10 Jul 2019  路  1Comment  路  Source: sanic-org/sanic

Describe the bug
Using pipenv to install sanic and uvicorn fails because Sanic requires websockets >= 6.0, <7.0, and uvicorn requires websockets ==7.*

You can install this with pipenv install --skip-lock, but locking the packages will produce an error.

$> pipenv graph
sanic==19.6.2
  - aiofiles [required: >=0.3.0, installed: 0.4.0]
  - httptools [required: >=0.0.10, installed: 0.0.13]
  - multidict [required: >=4.0,<5.0, installed: 4.5.2]
  - requests-async [required: ==0.5.0, installed: 0.5.0]
    - httpcore [required: ==0.3.*, installed: 0.3.0]
      - certifi [required: Any, installed: 2019.6.16]
      - chardet [required: ==3.*, installed: 3.0.4]
      - h11 [required: ==0.8.*, installed: 0.8.1]
      - h2 [required: ==3.*, installed: 3.1.0]
        - hpack [required: >=2.3,<4, installed: 3.0.0]
        - hyperframe [required: >=5.2.0,<6, installed: 5.2.0]
      - idna [required: ==2.*, installed: 2.8]
      - rfc3986 [required: ==1.*, installed: 1.3.2]
    - requests [required: ==2.*, installed: 2.22.0]
      - certifi [required: >=2017.4.17, installed: 2019.6.16]
      - chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
      - idna [required: >=2.5,<2.9, installed: 2.8]
      - urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.3]
  - ujson [required: >=1.35, installed: 1.35]
  - uvloop [required: >=0.5.3, installed: 0.12.2]
  - websockets [required: >=6.0,<7.0, installed: 6.0]
uvicorn==0.8.3
  - click [required: ==7.*, installed: 7.0]
  - h11 [required: ==0.8.*, installed: 0.8.1]
  - httptools [required: ==0.0.13, installed: 0.0.13]
  - uvloop [required: ==0.12.*, installed: 0.12.2]
  - websockets [required: ==7.*, installed: 6.0]

Expected behavior
Since the documentation describes running Sanic with uvicorn, I would expect this to work.

Environment (please complete the following information):

  • OS: Mac OS X (but I would expect it to be a problem on most platforms)
bug

Most helpful comment

Yes, this is a known issue. We hope to upgrade the Sanic implementation to the newer version of websockets in v19.9

>All comments

Yes, this is a known issue. We hope to upgrade the Sanic implementation to the newer version of websockets in v19.9

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eseglem picture eseglem  路  4Comments

Souldat picture Souldat  路  3Comments

geekpy picture geekpy  路  4Comments

woutor picture woutor  路  3Comments

sirex picture sirex  路  4Comments