facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.42k stars 989 forks source link

Python 3.11 #1131

Open ThiefMaster opened 1 year ago

ThiefMaster commented 1 year ago

It would be great to have Python bindings compatible with Python 3.11.

Even if it's just a prerelease on https://test.pypi.org/project/pywatchman/ like the Python 3.10 version...

sin-ack commented 1 year ago

I tried the latest commit, b6f0fc5, and it seems to work fine on Python 3.11. However there is a bug in setup.py which prevents you from installing the package using Poetry and such directly from a commit:

https://github.com/facebook/watchman/blob/b6f0fc5b373901aa25409a5257f9dfb86a02b34e/watchman/python/setup.py#L18

This needs to go up an additional level so that py_dir gets the correct path. I have a fork that has a fix for this, however I don't intend to sign the Facebook CLA so someone else would need to send a PR. Hoping maintainers can fix this up.