single |
Watchdog
========
|Build Status|
|CirrusCI Status|
Python API and shell utilities to monitor file system events.
Works on 3.8+.
Example API Usage
-----------------
A simple program that uses watchdog to monitor directories specified
as command-line arguments and logs events generated:
.. :changelog:
Changelog
---------
4.0.1
~~~~~
2024-05-23 • [full history]
- [inotify] Fix missing event_filter for the full emitter (`#1032
`__)
- Thanks to our beloved contributors: @mraspaud
4.0.0
~~~~~
2024-02-06 • [full history]
- Drop support for Python 3.7.
- Add support for Python 3.12.
- [snapshot] Add typing to dirsnapshot (`#1012
`__)
- [snapshot] Added ``DirectorySnapshotDiff.ContextManager`` (`#1011
`__)
- [events] FileSystemEvent, and subclasses, are now dataclasses, and their
``repr()`` has changed
- [windows] WinAPINativeEvent is now a dataclass, and its ``repr()`` has
changed
- [events] Log FileOpenedEvent, and FileClosedEvent, events in
LoggingEventHandler
- [tests] Improve FileSystemEvent coverage
- [watchmedo] Log all events in LoggerTrick
- [windows] The
``observers.read_directory_changes.WATCHDOG_TRAVERSE_MOVED_DIR_DELAY`` hack
was removed. The constant will be kept to prevent breaking other softwares.
- Thanks to our beloved contributors: @BoboTiG, @msabramo
3.0.0
~~~~~
2023-03-20 • [full history]
- Drop support for Python 3.6.
- watchdog is now PEP 561 compatible, and tested with mypy
- Fix missing ``> in FileSystemEvent.__repr__()`` (`#980
`__)
- [ci] Lots of improvements
- [inotify] Return from ``InotifyEmitter.queue_events()`` if not launched
when thread is inactive (`#963
`__)
- [tests] Stability improvements
- [utils] Remove handling of ``threading.Event.isSet`` spelling (`#962
`__)
- [watchmedo] Fixed tricks YAML generation (`#965
`__)
- Thanks to our beloved contributors: @kurtmckee, @altendky, @agroszer,
@BoboTiG
2.3.1
~~~~~
2023-02-28 • [full history]
- Run black on the entire source code
- Bundle the ``requirements-tests.txt`` file in the source distribution
(`#939 `__)
- [watchmedo] Exclude FileOpenedEvent events from AutoRestartTrick, and
ShellCommandTrick, to restore watchdog < 2.3.0 behavior. A better solution
should be found in the future. (`#949
`__)
- [watchmedo] Log FileOpenedEvent, and FileClosedEvent, events in
LoggerTrick
- Thanks to our beloved contributors: @BoboTiG
2.3.0
~~~~~
2023-02-23 • [full history]
- [inotify] Add support for IN_OPEN events: a FileOpenedEvent event will be
fired (`#941 `__)
- [watchmedo] Add optional event debouncing for ``auto-restart``, only
restarting once if many events happen in quick succession
|