Skip to content
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

Support for macOS, mainly by replacing inotify with watchgod, which works cross-plattform #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wosc
Copy link

@wosc wosc commented Jan 12, 2019

See issue #10 for more details. I've tested this under both Linux and macOS, and it worked fine for me.

Note that watchgod (isn't that name cute ;) does not use inotify/fsevents but file polling instead. I don't think the performance implications are terrible, but I admit it's not as pleasing to my nerd-sense of elegance.

My main reason for chosing it is that it offers an asyncio-compatible API, so it was really easy to integrate. Alternatives do exist, e.g. watchdog was mentioned in a previous issue comment, that uses inotify on Linux and FSEvents on macOS. However, its API is thread-based, and I have no idea how that could be integrated with asyncio, or whether that's even possible.

@jlebon
Copy link
Owner

jlebon commented Jan 14, 2019

Neat, thanks for this!

Alternatives do exist, e.g. watchdog was mentioned in a previous issue comment, that uses inotify on Linux and FSEvents on macOS. However, its API is thread-based, and I have no idea how that could be integrated with asyncio, or whether that's even possible.

Hmm, I haven't hacked on asyncio Python in a while, but I think we could get this to work. Will investigate.

phdru added a commit to phdru/textern that referenced this pull request Feb 24, 2024
`watchdog` is much more portable.

Fixes: jlebon#46.
phdru added a commit to phdru/textern that referenced this pull request Feb 24, 2024
`watchdog` is much more portable.

Fixes: jlebon#46.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants