Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warnings with websockets imports #829

Open
furechan opened this issue Jan 11, 2025 · 2 comments
Open

Deprecation warnings with websockets imports #829

furechan opened this issue Jan 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@furechan
Copy link

Describe the bug

The package gives deprecation warnings on import.

DeprecationWarning: websockets.client.connect is deprecated
DeprecationWarning: websockets.client.WebSocketClientProtocol is deprecated

To Reproduce

from polygon import RESTClient

Additional context
All packages installed with uv including websockets version 14.1

The warning comes from the following line in polygon/websocket/__init__.py:

from websockets.client import connect, WebSocketClientProtocol

websockets.client.connect has been deprecated. To be replaced I believe with websockets.connect. WebSocketClientProtocol has also been deprecated.

See websockets upgrade

@furechan furechan added the bug Something isn't working label Jan 11, 2025
@justinpolygon
Copy link
Contributor

Hey, I'll check this out. Thanks for reporting. What OS/python version are you seeing this on? I'm just wondering since I don't see this on my end but after looking at the docs we can fix regardless.

@furechan
Copy link
Author

furechan commented Jan 15, 2025

Thanks. I am on MacOS (Apple Silicon), Python Version 3.10, using a uv managed environment. The warnings appear while running some tests with pytest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants