We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While trying to resolve issue #1587 (comment) I run into another one when trying to upgrade from v12 to v14. (Note it works until 13.1)
v12
v14
Example
extra_headers = {"Authorization": f"Bearer {auth_token}"} async with websockets.connect(uri, extra_headers=extra_headers) as ws: ...
It seems that extra_headers parameter doesn't work with the new release and breaks existing code.
extra_headers
Traceback
Traceback (most recent call last): File "/home/alex/workspace/projectx/controller/controller.py", line 812, in <module> asyncio.run(connection_loop(state)) File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/alex/workspace/projectx/controller/controller.py", line 723, in connection_loop async with websockets.connect( File "/home/alex/workspace/projectx/.venv/lib/python3.12/site-packages/websockets/asyncio/client.py", line 484, in __aenter__ return await self ^^^^^^^^^^ File "/home/alex/workspace/projectx/.venv/lib/python3.12/site-packages/websockets/asyncio/client.py", line 441, in __await_impl__ self.connection = await self.create_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alex/workspace/projectx/.venv/lib/python3.12/site-packages/websockets/asyncio/client.py", line 367, in create_connection _, connection = await loop.create_connection(factory, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'
The text was updated successfully, but these errors were encountered:
https://websockets.readthedocs.io/en/stable/howto/upgrade.html#extra-headers-additional-headers
Sorry, something went wrong.
The changelog for version 14.0 has a big warning and a link to this guide.
Thanks, I just skimmed over the release notes and didn't find anything relevant. I assume this works then
No branches or pull requests
While trying to resolve issue #1587 (comment) I run into another one when trying to upgrade from
v12
tov14
. (Note it works until 13.1)Example
It seems that
extra_headers
parameter doesn't work with the new release and breaks existing code.Traceback
The text was updated successfully, but these errors were encountered: