-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
[macOS] Events without "renamed" or "modified" flags are dropped #702
Comments
@CCP-Aporia do you mind having a look? |
Looking at the conversions in the PR, it appears that @ceelian encountered a similar issue. Also, I was surprised that this did not show up as a test failure. But then I realised that all the |
Out of curiosity, does the issue happen when running disabled tests? |
None of the emitter tests currently pass on macOS, for apparently two reasons:
The tests with
|
With the patches here to
It's mostly the nested tests which fail because some events for children of directories are not generated. This may be related to events being coalesced hierarchically, as described in the developer docs. Seeing that the new Finally, here is the full test output: test_resutls.txt |
Thanks for the detailed report! I'll make some time this week to look into a fix. |
To give a small update on this: I have made necessary changes to expose the missing event flags, |
It would be awesome to have regression test working, thanks for your work 💪 |
@CCP-Aporia I am coming for news :) |
I'm still working on the tests (there's a "fun" memory corruption crash with Python 2.7 on Big Sur). Also I'm travelling for the next few days with limited internet access so won't be able to post an update, but will have time to hopefully figure this out. |
Rebase your branch on master, Python 2.7 and 3.4 supports have been dropped ;) |
Oh I didn't realize that. It is a little bit unfortunate because we are still on Python 2.7 (and will be for the foreseeable future), so I kind of need to get that working. :-) |
I am OK to keep a Python 2 branch for some time ;) I will create it and you will be able to open a PR against it (+ backport to master). I will keep releasing watchdog for Python 2 and Python 3 then. |
About Python 2.7 and Big Sur, keep in mind that Big Sur will be officially supported on 3.8+. So if a test is not passing, let's skip it if it makes your like easier ;) |
Thanks a lot! Will report back on Monday. |
On macOS, all events which don't have the native
kFSEventStreamEventFlagItemModified
orkFSEventStreamEventFlagItemRenamed
flags set are dropped and then crash the emitter thread.I believe the offending lines are:
watchdog/src/watchdog/observers/fsevents.py
Lines 114 to 116 in 186a39c
If
event.is_renamed
andevent.is_modified
both are False, the next attributes checked areevent.is_inode_meta_mod
andevent.is_xattr_mod
. However, those attributes don't exist / are never created in thewatchdog_fsevents.c
extension module.Edit: This was introduced with the changes to fsevents in #680.
The text was updated successfully, but these errors were encountered: