Websockets 14.0 breaks python-libjuju < 3.5.2.1

On Saturday, November 9th, websockets 14.0 was released to PyPI which is incompatible with python-libjuju < 3.5.2.1. You will quickly encounter this version incompatibility if you’re using the juju and pytest-operator packages to run your charm integration tests as you will start to see several AttributeError’s raised instead of charms being deployed:

Traceback (most recent call last):
  File "/home/ubuntu/slurm-charms/.tox/integration/lib/python3.12/site-packages/juju/client/connection.py", line 873, in _connect_with_login
    result = (await self.login())['response']
              ^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/slurm-charms/.tox/integration/lib/python3.12/site-packages/juju/client/connection.py", line 970, in login
    return await self.rpc({
           ^^^^^^^^^^^^^^^^
  File "/home/ubuntu/slurm-charms/.tox/integration/lib/python3.12/site-packages/juju/client/connection.py", line 643, in rpc
    if self.monitor.status == Monitor.DISCONNECTED:
       ^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/slurm-charms/.tox/integration/lib/python3.12/site-packages/juju/client/connection.py", line 224, in status
    if stopped or not connection._ws.open:
                      ^^^^^^^^^^^^^^^^^^^
AttributeError: 'ClientConnection' object has no attribute 'open'

To avoid the issue, you will either need to bump the version of python-libjuju you’re using to the newly released 3.5.2.1 version that specifies an upper-bound for the version of websockets pulled from PyPI, or pin the version of websockets pulled to be less than 14.0 in your test requirements.