biothings/biothings.api

retire the use of pyinotify for autoreloader

newgene opened this issue · 1 comments

package pyinotify is no longer maintained, and it start to show a DeprecationWarning in Python 3.10:

../../../../../opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/pyinotify.py:71
  /opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/pyinotify.py:71: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
    import asyncore

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

We use this package (Linux only) for the hub's autoreload feature (biothings.utils.hub.PyInotifyHubReloader). We do have an alternative TornadoAutoReloadHubReloader available when pyinotify is not available (e.g. non-Linux platform).

We can try to look for a replacement for the inotify python binding. If not available, we can simply disable pyinotify for Python >=3.12.

released in 0.12.0