diff --git a/src/watchdog/observers/fsevents.py b/src/watchdog/observers/fsevents.py index 411624eb..08966c1e 100644 --- a/src/watchdog/observers/fsevents.py +++ b/src/watchdog/observers/fsevents.py @@ -343,5 +343,6 @@ def schedule(self, event_handler, path, recursive=True): if isinstance(path, str): path = unicodedata.normalize("NFC", path) if not recursive: + import warnings warnings.warn("FSEvents requires and assumes recursive=True") return BaseObserver.schedule(self, event_handler, path, recursive=True)