Bug#1004388: RFP: python3-inotify -- An adapter to Linux kernel support for inotify directory-watching

2022-07-06 Thread Bastian Germann

Control: retitle -1 ITP: python-inotify -- An adapter to Linux kernel support 
for inotify directory-watching
Control: owner -1 b...@debian.org

I am going to package this under the Python Team's umbrella at
https://salsa.debian.org/python-team/packages/python-inotify



Bug#1004388: RFP: python3-inotify -- An adapter to Linux kernel support for inotify directory-watching

2022-01-26 Thread Enrico Zini
Package: wnpp
Severity: wishlist

* Package name: python3-inotify
  Version : 0.2.10
  Upstream Author : Dustin Oprea 
* URL : https://github.com/dsoprea/PyInotify
* License : GPL-2
  Programming Lang: Python
  Description : An adapter to Linux kernel support for inotify 
directory-watching

inotify functionality is available from the Linux kernel and allows you
to register one or more directories for watching, and to simply block
and wait for notification events. This is obviously far more efficient
than polling one or more directories to determine if anything has
changed. This is available in the Linux kernel as of version 2.6 .
. 
We've designed this library to act as a generator. All you have to do is
loop, and you'll see one event at a time and block in-between. After
each cycle (all notified events were processed, or no events were
received), you'll get a None. You may use this as an opportunity to
perform other tasks, if your application is being primarily driven by
inotify events. By default, we'll only block for one-second on queries
to the kernel. This may be set to something else by passing a
seconds-value into the constructor as block_duration_s.

There exist two upstream inotify libraries significant here:

https://github.com/dsoprea/PyInotify
Subject of this RFP: note that it contains a module called
'inotify', not 'pyinotify'
https://github.com/seb-m/pyinotify
Currently ppackaged as python3-pyinotify

Looking at https://github.com/dsoprea/PyInotify it says:

This project is unrelated to the *PyInotify* project that existed
prior to this one (this project began in 2015). That project is
defunct and no longer available.

and indeed, https://github.com/seb-m/pyinotify which is listed as
upstream of python3-pyinotify, seems to be stuck in 2015.

To the best that I could see, https://github.com/dsoprea/PyInotify is
not currently packaged in Debian.

If I understand correctly, the only way to access inotify functionality
in Python with libraries in Debian at the moment is via the old
pyinotify, and at least gunicorn is requiring the newer one for
inotify-based reloading to work:

   https://docs.gunicorn.org/en/stable/settings.html#reload
   "In order to use the inotify reloader, you must have the inotify
   package installed."

I reported an issue to python3-pyinotify to track the upstream
abandonment, and I'm filing this RFP for a replacement that would also
fulfill gunicorn requirements to activate inotify-based features


Enrico