polygon-io/client-python

Support Websockets >= 13.0

Closed this issue · 4 comments

Is your feature request related to a problem? Please describe.

The pyproject.toml says that newer websockets package is supported websockets = ">=10.3,<14.0", but when I install pip install -U polygon-api-client it seems the requirement is <13.0

 pip install -U polygon-api-client
Requirement already satisfied: polygon-api-client in ./menv/lib/python3.12/site-packages (1.14.2)
Requirement already satisfied: certifi<2025.0.0,>=2022.5.18 in ./menv/lib/python3.12/site-packages (from polygon-api-client) (2024.8.30)
Requirement already satisfied: urllib3<3.0.0,>=1.26.9 in ./menv/lib/python3.12/site-packages (from polygon-api-client) (2.2.3)
Requirement already satisfied: websockets<13.0,>=10.3 in ./menv/lib/python3.12/site-packages (from polygon-api-client) (12.0)
 pip install -U polygon-api-client
Requirement already satisfied: polygon-api-client in ./menv/lib/python3.12/site-packages (1.14.2)
Requirement already satisfied: certifi<2025.0.0,>=2022.5.18 in ./menv/lib/python3.12/site-packages (from polygon-api-client) (2024.8.30)
Requirement already satisfied: urllib3<3.0.0,>=1.26.9 in ./menv/lib/python3.12/site-packages (from polygon-api-client) (2.2.3)
Collecting websockets<13.0,>=10.3 (from polygon-api-client)
  Downloading websockets-12.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.6 kB)
Downloading websockets-12.0-cp312-cp312-macosx_11_0_arm64.whl (121 kB)
Installing collected packages: websockets
  Attempting uninstall: websockets
    Found existing installation: websockets 13.1
    Uninstalling websockets-13.1:
      Successfully uninstalled websockets-13.1
 pip install websockets==13.0
Collecting websockets==13.0
  Downloading websockets-13.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.7 kB)
Downloading websockets-13.0-cp312-cp312-macosx_11_0_arm64.whl (148 kB)
Installing collected packages: websockets
  Attempting uninstall: websockets
    Found existing installation: websockets 12.0
    Uninstalling websockets-12.0:
      Successfully uninstalled websockets-12.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
polygon-api-client 1.14.2 requires websockets<13.0,>=10.3, but you have websockets 13.0 which is incompatible.

Describe the solution you'd like

Update the dependency for websockets

I see that the requirement is websockets = ">=10.3,<14.0", but that doesn't seem to be the case when downloading from pypi?

Updating the version in pyproject.toml might do the trick.

PR #799 closes this issue

Thanks @jjfantini. I'll check this out. Most of the time our automation via dependabot catches this stuff. I'll do some exploring and see what's up. Thanks for reporting.

This should be fixed via #813 and I'll release a new build early next week. Thanks for finding this.