seb-m / pyinotify

Monitoring filesystems events with inotify on Linux.
http://github.com/seb-m/pyinotify/wiki
MIT License
2.29k stars 379 forks source link

Python 3.12 removed asyncore module #204

Open arkamar opened 1 year ago

arkamar commented 1 year ago

This library is broken with Python 3.12 because of removed asyncore module

27f4772d425a ~ # python3.12 pyinotify-0.9.6/python3/pyinotify.py -h
Traceback (most recent call last):
  File "/root/pyinotify-0.9.6/python3/pyinotify.py", line 71, in <module>
    import asyncore
ModuleNotFoundError: No module named 'asyncore'

Python 3.11 prints this warning:

27f4772d425a ~ # python3.11 pyinotify-0.9.6/python3/pyinotify.py -h
/root/pyinotify-0.9.6/python3/pyinotify.py:71: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
  import asyncore
Usage: pyinotify.py [options] [path1] [path2] [pathn]
lexdene commented 11 months ago

Maybe this project is no longer maitained. So I forked it and renamed to pyinotify-elephant-fork.

Try:

pip install pyinotify-elephant-fork

https://pypi.org/project/pyinotify-elephant-fork/