Skip to content

Commit 3436c2d

Browse files
authored
Merge pull request #1183 from luissimas/restrict-websockets-version
#1183 #### Description Restricts the websockets library version to only install releases before 14.0. This is needed since websockets 14 introduces a number of breaking changes that are not compatible with python-libjuju. Resolves - #1184 #### QA Steps ``` tox -e integration ``` #### Notes & Discussion @luissimas said: I've noticed this problem when my integration tests started failing today without any apparent reason. The version 14.0 of websockets was released yesterday. You can check the changelog at: https://websockets.readthedocs.io/en/stable/project/changelog.html. It's worth noting that this new version of websockets drops support for Python 3.8. For the sake of completeness, I was getting this error on my integration tests: ``` Traceback (most recent call last): File "/home/runner/actions-runner/_work/my-charm/my-charm/.tox/integration/lib/python3.10/site-packages/juju/client/connection.py", line 873, in _connect_with_login result = (await self.login())['response'] File "/home/runner/actions-runner/_work/my-charm/my-charm/.tox/integration/lib/python3.10/site-packages/juju/client/connection.py", line 970, in login return await self.rpc({ File "/home/runner/actions-runner/_work/my-charm/my-charm/.tox/integration/lib/python3.10/site-packages/juju/client/connection.py", line 643, in rpc if self.monitor.status == Monitor.DISCONNECTED: File "/home/runner/actions-runner/_work/my-charm/my-charm/.tox/integration/lib/python3.10/site-packages/juju/client/connection.py", line 224, in status if stopped or not connection._ws.open: AttributeError: 'ClientConnection' object has no attribute 'open' ```
2 parents a70983d + 5b45993 commit 3436c2d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
'macaroonbakery>=1.1,<2.0',
2727
'pyRFC3339>=1.0,<2.0',
2828
'pyyaml>=5.1.2',
29-
'websockets>=8.1',
29+
'websockets>=8.1,<14.0',
3030
'paramiko>=2.4.0',
3131
'pyasn1>=0.4.4',
3232
'toposort>=1.5,<2',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ deps =
3838
pytest-asyncio
3939
pytest-xdist
4040
Twine
41-
websockets
41+
websockets<14.0
4242
kubernetes<31.0.0
4343
hvac
4444
packaging

0 commit comments

Comments
 (0)