archweb
archweb copied to clipboard
pyinotify from PyPI is not Python 3.12 compatible
Hi, the version of pyinotify specified in requirements.txt (https://github.com/archlinux/archweb/blob/master/requirements_prod.txt#L2) is not Python 3.12 compatible, it tries to import asyncore
but this doesn't exist anymore (ModuleNotFoundError: No module named 'asyncore'
).
In Arch Linux packaging this was patched https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyinotify/-/commit/df875e727a19fb9e83d2af55cc5f368b94eec705 but if installed in a venv via PyPI this patch is not present of course.
Maybe it's time to do something about this dependency that wasn't updated in 9 years? https://github.com/seb-m/pyinotify/commits/master/
For now I'll patch it in the venv using the patch from the repo package, not sure what the best path forward is long-term.
Yes, we should switch as we also run it from a venv in production :sweat_smile:
It is forked into https://github.com/seb-m/pyinotify/issues/204
I'll look for some other alternatives.
Related commit: 4355b0faf973e909655875f63d633f1c1247c14c