-
Notifications
You must be signed in to change notification settings - Fork 992
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
pywatchman raises SystemError on Python 3.10 #970
Comments
I'm not familiar enough with watchman to even know where I can find pywatchman 1.4.1, but wasn't this issue fixed in the code a year ago in 6813a94? |
It looks like it was fixed in that commit, however for some reason there hasn't been a new release of pywatchman on pypi since September 1st 2017: https://pypi.org/project/pywatchman/#history |
@wez Would you still be the person to update pypi, or should we draw this to the attention of someone else nowadays? :-) |
@fanzeyi is more involved these days. I'll sync up with them to ensure that they have the ability to update pypi |
@pauloxnet Apologies for the delay and I will try to get a version out soon. I have published a pre-release 1.4.2.dev1 of pywatchman to TestPyPi. You can find it at https://test.pypi.org/project/pywatchman/1.4.2.dev1/. I am worried dumping four years of change to PyPi directly might break something somewhere so I'd like to take it slow. I also would like to find sometime to fix our CI and have the package automatically published some time in the future. That being said, I have built some wheels for Python 3.6 to 3.10 targeting manylinux2014 and macos-arm64 there in TestPyPi (I built them by hand, not CI, thus the lack of Windows and macos-amd64 :( ). Please use the following command to try it out. If everything works fine, I will make a pre-release to the mainline PyPi later this week for more testing.
Thanks Also, other people in this thread please give it a try as well. Thank you :) |
I'll have a look at it as soon as possible. in the meantime i shared your request to test the dev version on twitter. I hope it helps this phase. |
@fanzeyi I have successfully tested pywatchman 1.4.2.dev1 in these environments:
I hope others will test and report here. Thanks. |
v1.4.2 works fine on my end, please release it ASAP. |
v1.4.2 also works for me on Python 3.10! I checked with Django and a standalone test script. |
@fanzeyi I think maybe we can release a 1.5.0 version instead of 1.4.2 due all last year changes. |
or even 2.0, the new watchman is nothing like 4.9.0 |
Hey, sorry to be that developer, but can we have a release? pywatchman is broken on Python 3.10 until this is out. |
I'm a user, not a maintainer. @fanzeyi is the only person who might make a release, it seems, but presumably they're currently busy. I'm sure they'll get to it when they can, but shipping a new release (to a certain extent) puts you on the hook for breakage. Right now they may not have the time to risk that. |
a release would be nice, additionally i tried to install it directly from git with:
but it seems
it seems like watchman_src_dir = os.environ.get("CMAKE_CURRENT_SOURCE_DIR")
if watchman_src_dir is None:
watchman_src_dir = os.path.abspath(
os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
) should allow using pip to directly install from git, after the change i can install it:
|
@jwatt I add my opinion here but it is not a direct answer to you, indeed I thank you for the hint. The last python release of watchman was in 2017, I don't think a company like Facebook hasn't had the time or other people to make a release in these, rather I think we have no interest in maintaining this python package. The people who are commenting in this thread are writing and releasing free software everyday for the community and no one is making unreasonable requests. The biggest problem, however, I do not think is a breakage, but the abandonment of the package by the users, after that of the developers themselves. Personally I have long since removed the support of watchman in all my projects waiting for this release which by now I know it will not come or it will come too late. The only regret is that Django supports out of the box watchman, I hope there will soon be Django support for a valid and maintained alternative such as watchfiles. |
I don't want to be that guy but, any updates on the release? @fanzeyi 👋🏻 |
@fanzeyi Could we please have a release? TestPyPI and similar sites are simply not an option if you have code that depends on this - you can't just pull in stuff from TestPyPI in a requirements.txt/setup.cfg for example. |
For anyone who comes here looking to use pywatchman with the Django dev server to reduce idle CPU usage, I can instead recommend using django-extensions's |
AFAIK BTW, I pinged the developer on twitter and got some feedback on what's blocking an updated release: https://twitter.com/fanzeyi/status/1537369006713217025 |
At the risk of sounding like "that person" who suggests an alternative library that they maintain: Those frustrated by watchman and watchdog might consider watchfiles. A few advantages of watchfiles:
|
For anyone else that is waiting on the 1.4.2 release specifically for Django, you can "somewhat easily fix this" locally. I can't imagine a case of doing this on a CI Server or something similar. Locally you just edit the file Specifically the following
Basically looks like watchman (the service) used to send I spent a bit of time following the rabbit down the hole to chase this issue.. Hopefully you won't have to... FWIW, this is a fairly trivial and harmless change IMO. Small update
This should give you the sock file something like this...
Using that export the following
Once you resolve the socket problem, you'll run into |
python37Packages is no longer defined in today's Nixpkgs, pywatchman does not work with Python 3.10[^1], and we need to be more explicit about which inputs we need as packages in the shell. [^1]: facebook/watchman#970
`python37Packages` is no longer defined in today's Nixpkgs, pywatchman does not work with Python 3.10[^1], Use `watchexec`, that we already use in other places, which is simpler to use. Additionally, we need to be more explicit about which inputs we need as packages in the shell. [^1]: facebook/watchman#970
FYI pywatchman 2.0.0 has been released and the original issue no longer reproduces on Python 3.11 $ python3.11 -m venv venv
$ . venv/bin/activate
$ pip install pywatchman==2.0.0
$ python3 -c "import pywatchman; print(pywatchman.client().capabilityCheck())"
# {'version': '2024.01.22.00', 'capabilities': {}} |
3.12 had been out for ages, 3.13 is in alpha... |
The same test passes on 3.12 and 3.13.0a4 as well. |
The latest version of pywatchman (1.4.1) is not working on Python 3.10.
A
SystemError
occurs which can be reproduced as follows:This code will trigger
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
.The text was updated successfully, but these errors were encountered: