jhack icon indicating copy to clipboard operation
jhack copied to clipboard

Python 3.13 support

Open dimaqq opened this issue 1 year ago • 2 comments

Bug Description

)> jhack show-relation hexanator:send-ca-cert
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /code/jhack/jhack/utils/show_relation.py:980 in sync_show_relation                               │
│                                                                                                  │
│    977 │   - ``$ jhack utils show-relation my_app:peers`` - peer relation\n                      │
│    978 │   - ``$ jhack utils show-relation my_app:foo cross_model_app:bar`` - CMRs\n             │
│    979 │   """                                                                                   │
│ ❱  980 │   return _sync_show_relation(                                                           │
│    981 │   │   endpoint1=endpoint1,                                                              │
│    982 │   │   endpoint2=endpoint2,                                                              │
│    983 │   │   n=n,                                                                              │
│                                                                                                  │
│ ╭──────────────────── locals ────────────────────╮                                               │
│ │               color = 'auto'                   │                                               │
│ │           endpoint1 = 'hexanator:send-ca-cert' │                                               │
│ │           endpoint2 = None                     │                                               │
│ │              format = <Format.auto: 'auto'>    │                                               │
│ │ hide_empty_databags = False                    │                                               │
│ │               model = None                     │                                               │
│ │                   n = None                     │                                               │
│ │      show_juju_keys = False                    │                                               │
│ │               watch = False                    │                                               │
│ ╰────────────────────────────────────────────────╯                                               │
│                                                                                                  │
│ /code/jhack/jhack/utils/show_relation.py:1019 in _sync_show_relation                             │
│                                                                                                  │
│   1016 │   while True:                                                                           │
│   1017 │   │   start = time.time()                                                               │
│   1018 │   │                                                                                     │
│ ❱ 1019 │   │   table = asyncio.run(                                                              │
│   1020 │   │   │   render_relation(                                                              │
│   1021 │   │   │   │   endpoint1,                                                                │
│   1022 │   │   │   │   endpoint2,                                                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │               color = 'auto'                                                                 │ │
│ │             Console = <class 'rich.console.Console'>                                         │ │
│ │             console = <console width=181 ColorSystem.TRUECOLOR>                              │ │
│ │           endpoint1 = 'hexanator:send-ca-cert'                                               │ │
│ │           endpoint2 = None                                                                   │ │
│ │              format = <Format.auto: 'auto'>                                                  │ │
│ │ hide_empty_databags = False                                                                  │ │
│ │               model = None                                                                   │ │
│ │                   n = None                                                                   │ │
│ │                rich = <module 'rich' from                                                    │ │
│ │                       '/code/jhack/.ahh-venv/lib/python3.13/site-packages/rich/__init__.py'> │ │
│ │      show_juju_keys = False                                                                  │ │
│ │               start = 1741588711.6658273                                                     │ │
│ │               watch = False                                                                  │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/dima.linux/.local/share/uv/python/cpython-3.13.0-linux-aarch64-gnu/lib/python3.13/asyncio/ │
│ runners.py:194 in run                                                                            │
│                                                                                                  │
│   191 │   │   │   "asyncio.run() cannot be called from a running event loop")                    │
│   192 │                                                                                          │
│   193 │   with Runner(debug=debug, loop_factory=loop_factory) as runner:                         │
│ ❱ 194 │   │   return runner.run(main)                                                            │

To Reproduce

py 3.13 venv jhack show-relation hexanator:send-ca-cert

Environment

...

Relevant log output

...

Additional context

...

dimaqq avatar Mar 10 '25 06:03 dimaqq