alpacahq / alpaca-py

The Official Python SDK for Alpaca API
https://alpaca.markets/sdks/python/getting_started.html
Apache License 2.0
602 stars 147 forks source link

fix: Relax websockets version requirements #435

Closed hiohiohio closed 7 months ago

hiohiohio commented 7 months ago
impredicative commented 7 months ago

@hiohiohio What is the reason for relaxing it? Already v12.0 of websockets has been out. Who needs v10 and why? Or is it being relaxed just for generosity reasons?

impredicative commented 7 months ago

@hiohiohio More importantly, please note that this change now opens up websockets to be automatically updated to v12.0. Has this version been tested?

hiohiohio commented 7 months ago

Hey @impredicative , thank you for heads-up! Good point. I have just checked trade events and market data stream (crypto) with websockets v12.0 and seems it works in my env. Based on the changelog of websockets, the incompatibility change is cutting Python 3.7 supports. Their policy is to keep compatibility as much as possible. If you found an issue, please let us know.

The reason of this change is that there was an issue to bump alpaca-py to v0.20.2 due to this websockets requirements in a partner. Without upgrading alpaca-py, alpaca-py could not fetch a trade account via broker api. Therefore, it is a critical issue and required to be resolved quickly. Decided to relax this websockets version requirements.