Hey, recently Arch Linux updated their system Python from 3.13 to 3.14 and this seems to have broken something in regards to keyszer which could not be fixed with a simple reinstallation. In order to test things properly I created a 3.13 venv via uv and installed keyszer there, worked fine. I then recreated the venv with 3.14 and got the same error as with 3.14 system Python. I don't see a clear reason why the software breaks now but here's a stack trace:
date hostname sh[23895]: keyszer v0.6.92
date hostname sh[23895]: (--) WATCH: Watching for new devices to hot-plug.
date hostname sh[23895]: Traceback (most recent call last):
date hostname sh[23895]: File "/home/keymapper/programs/keyszer/src/keyszer/input.py", line 63, in main_loop
date hostname sh[23895]: loop = asyncio.get_event_loop()
date hostname sh[23895]: File "/home/keymapper/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
date hostname sh[23895]: raise RuntimeError('There is no current event loop in thread %r.'
date hostname sh[23895]: % threading.current_thread().name)
date hostname sh[23895]: RuntimeError: There is no current event loop in thread 'MainThread'.
date hostname sh[23895]: During handling of the above exception, another exception occurred:
date hostname sh[23895]: Traceback (most recent call last):
date hostname sh[23895]: File "/home/keymapper/bin/keyszer", line 7, in <module>
date hostname sh[23895]: sys.exit(main())
date hostname sh[23895]: ~~~~^^
date hostname sh[23895]: File "/home/keymapper/programs/keyszer/src/keyszer/cli.py", line 209, in main
date hostname sh[23895]: main_loop(args.devices, args.watch)
date hostname sh[23895]: ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
date hostname sh[23895]: File "/home/keymapper/programs/keyszer/src/keyszer/input.py", line 80, in main_loop
date hostname sh[23895]: shutdown()
date hostname sh[23895]: ~~~~~~~~^^
date hostname sh[23895]: File "/home/keymapper/programs/keyszer/src/keyszer/input.py", line 18, in shutdown
date hostname sh[23895]: loop = asyncio.get_event_loop()
date hostname sh[23895]: File "/home/keymapper/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
date hostname sh[23895]: raise RuntimeError('There is no current event loop in thread %r.'
date hostname sh[23895]: % threading.current_thread().name)
date hostname sh[23895]: RuntimeError: There is no current event loop in thread 'MainThread'.
Reproduction should presumably be possible via
uv python install 3.13
uv venv --python 3.13 --allow-existing .venv
. .venv/bin/activate
uv pip install keyszer
"normal steps to run keyszer"
or replace 3.13 with 3.14 to break (breakage may require a system reboot). I assume that other Python tooling should work just fine too as my previous venv was created and managed by pip, not by uv.
For the time being I'll be installing 3.13 since it looks to still be working just fine and hope that someone has the time and energy to look into this before 3.13 goes EOL and is dropped from uv.
Hey, recently Arch Linux updated their system Python from 3.13 to 3.14 and this seems to have broken something in regards to keyszer which could not be fixed with a simple reinstallation. In order to test things properly I created a 3.13 venv via uv and installed keyszer there, worked fine. I then recreated the venv with 3.14 and got the same error as with 3.14 system Python. I don't see a clear reason why the software breaks now but here's a stack trace:
Reproduction should presumably be possible via
or replace
3.13with3.14to break (breakage may require a system reboot). I assume that other Python tooling should work just fine too as my previous venv was created and managed by pip, not by uv.For the time being I'll be installing 3.13 since it looks to still be working just fine and hope that someone has the time and energy to look into this before 3.13 goes EOL and is dropped from uv.