New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force FSEvents to use recursive mode to ensure that events are delivered #1013
base: master
Are you sure you want to change the base?
Conversation
Does anyone who has a Mac want to help out with this? Otherwise, I'm going to have to keep on triggering CI failures just to see how it runs. |
I could give a hand later maybe. def test_add_watch_twice(observer: BaseObserver, p: P) -> None:
"""Adding the same watch twice used to result in a null pointer return without an exception.
See https://github.com/gorakhargosh/watchdog/issues/765
"""
a = p("a")
mkdir(a)
h = FileSystemEventHandler()
> w = ObservedWatch(a)
E TypeError: ObservedWatch.__init__() missing 1 required positional argument: 'recursive' |
296570e
to
b59d7b4
Compare
Done and done, though honestly, I don't expect it to work this time either. |
@Rosuav What needed to be done on this one? I'm running into the same issue and would be happy to help, whether it's contributing code or just testing on my Macs |
Testing. The existing code works just fine on Linux, so all I can really do is make sure that my attempts don't actually break things. I have no way to see whether it's any improvement. So if you can grab the code, try it out, and see whether it works, that would be immensely helpful. You can quickly iterate on it, make small changes and test, without waiting for the whole "commit, push, wait for CI, read the log" thing. As you can see, I tend to wander off and do other things (you know how it is, always myriad other things to look into). |
Code that works fine on Linux can fail on a Mac, due to inotify working fine with non-recursive but FSEvents failing. The solution is to ensure recursive mode.
Patch mandates recursive mode when using FSEvents.