pypi / watchdog
watchdog
What changed in watchdog 6 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-05.
19 breaking3 deprecations11 new APIs and options1 performance5 behavior and defaults12 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initwatchdog 738 changes
Breaking changes 11
Replaces the deprecated DelayedQueue.delay_sec attribute.
Adds an event for directory metadata modifications, separate from content modifications; these events no longer trigger on_modified().
EventDispatcher rejects bool values for timeout instead of treating True as one second.
EventEmitter rejects bool values for timeout instead of treating True as one second.
Adds an event for file metadata modifications, separate from content modifications; these events no longer trigger on_modified().
Registration errors for a requested root path are no longer suppressed; a missing root raises FileNotFoundError.
Implement on_attrib() to handle file and directory metadata modification events.
Pattern matching now uses full-match semantics; users must update patterns to glob-like syntax, such as changing *.py to **/*.py.
Adds ignore_policy to configure multi-path event filtering for moves and renames; matching is now strict by default.
The default changes from "*" to "**" to match absolute paths at any depth under full_match() semantics.
Support for Python 3.9 and 3.10 is dropped.
Deprecations 3
Replaces the deprecated debounce_interval_seconds argument and attribute of EventDebouncer and AutoRestartTrick.
The EventDebouncer and AutoRestartTrick argument and attribute are deprecated in favor of debounce_interval; the old names still work with a DeprecationWarning.
The attribute is deprecated in favor of delay; the old name still works with a DeprecationWarning.
New APIs and options 9
The inotify and fsevents backends support the follow_symlink keyword argument.
FSEventsEmitter and FSEventsObserver accept a latency keyword argument; raising it coalesces duplicate events.
Returns the total number of changes in a DirectorySnapshotDiff.
ObservedWatch supports the follow_symlink keyword argument.
Observer supports use as a context manager for automatic start and stop management.
watchmedo can now be run with python -m watchdog.
Adds ignore_policy to configure multi-path event filtering for moves and renames.
ShellCommandTrick and watchmedo shell-command allow configuring shell_executable and cwd.
Adds a time-duration type alias; duration parameters previously hinted as int now accept float.
Behavior and default changes 4
With ignore_device=True, moved files and directories are detected when the device ID changes between snapshots.
Supports inotify on FreeBSD 15 and newer.
The path annotation reflects pathlib.Path support, and watches can now be scheduled on individual files.
File system events are now shown by default.
Fixes and other changes 11
Watches directories moved in from outside a recursively watched directory so changes inside them are reported.
Creates the inotify instance lazily, allowing observer and polling imports to succeed when the instance limit is reached.
Reconciles recursive watches after a queue overflow so subsequent filesystem changes are observed.
Prevents a KeyError from killing the inotify thread when a directory tree is copied or extracted into a recursively watched directory.
BaseObserver now uses on_thread_start() instead of overriding start(), aligning it with BaseThread.
Fixes building the fsevents extension on PyPy by updating the bundled compatibility header.
Reconciles recursively watched directories renamed before their source watch was registered and reports initial changes in existing descendants.
Generates YAML that watchmedo tricks can load, with trick options nested under the trick name rather than unsupported args/kwargs keys.
case_sensitive=False matching now ignores case on Python versions below 3.13.
Transient polling OSErrors are logged and retried instead of emitting a directory deletion event and stopping the emitter.
Adds support for Python 3.15.
watchdog 613 changes
Breaking changes 8
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the unused function from the echo module.
Removed the --trace CLI argument because events are logged by default at the LoggerTrick class level.
New APIs and options 2
Added the __repr__() method to the HelpFormatter class.
Added the __repr__() method to the Trick class.
Performance 1
Uses select.poll() instead of deprecated select.select(), if available.
Behavior and default changes 1
The stop_signal keyword argument can now be either a signal.Signals or an int.
Fixes and other changes 1
Fixed reading the inotify file descriptor after closing it.