From a18bf1c3bc5ca258d659a77b316d4b33fcbf9f01 Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Tue, 10 Oct 2023 07:26:45 +1100 Subject: [PATCH] Import warnings (duh) --- src/watchdog/observers/fsevents.py | 1 + 1 file changed, 1 insertion(+) 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)