-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix: remove the use of asyncio.get_child_watcher() for python3.14 #584
Conversation
Looks like that the CI fails before it runs the tests. |
3b95c0a
to
accf17f
Compare
I will try to diagnose the test failure UPDATE: this is an upstream issue, see neovim/neovim#31894 |
Oh, locally I'm running nvim 0.10.3 and everything works. GH runs nvim nightly? |
I've rebased on master and it shows that the patch works fine with nvim-stable but fails with nvim-nightly. |
windows ci shows an issue:
other than that, the failing
|
Maybe we need to make sure the ThreadedChildWatcher is used on Windoze? |
de3a116
to
b91063f
Compare
CI on python3.7 reports:
whereas on all other python versions (>=3.8) CI failure is expected just because of Nvim crashing. It'd be also appreciated if you could fix the commit message title with an appropriate header (e.g. |
I'm sick, it has to wait ... |
If necessary, we can drop python 3.7 support. |
The error on 3.7 is now the same as with 3.13 |
neovim/neovim#31894 was fixed, will re-run the tests here after a new nightly is posted. |
Rebased, tests are mostly passing now. The Windows and MacOS tests with Python 3.13 are failing. On Windows it looks like we have some closing workaround which fails with Python 3.13 now.
I have no idea what is wrong on MacOS. |
I added a commit which disabled the workaround on Windows and that seems to work. Not sure if this is the right fix. I have no clue about Windows. The failing test_attach.py::test_connect_stdioThe test on MacOS seems to be race condition. Now it works on 3.13 and fails on 3.12. |
I don't think the macOS failure has something to do with this PR; it'll be a different bug that already existed. I'll see later if we can bring a proper fix. |
I cherry-picked the commit eb14e83 for bumping up msgpack as it's a bit tangential to this fix. Regarding the workaround in 17fbcbc, we can try disabling the workaround for python3.13 on Windows to see if the bug has been fixed. But I believe for older versions this workaround will still be necessary. |
3dc3074
to
856bf92
Compare
I really start to hate Python. python/cpython@9d2e1ea Every 2 versions they completely break the API. WTF. |
Looks like supporting 3.14 is a much bigger rewrite. |
I appreciate your patience. Now as I think about the role of child_watcher, it's not quite crucial part of the pynvim functionality and I think we actually don't need it for other than preventing resource leak and some unwanted side effects (fd4247c) when the event loop closes. Let's make our life simpler and easier: my proposal is to simply just disable child_watcher in python3.14 (i.e. set |
Looks like I misunderstood how things are now. I hope the latest changes are correct now. |
Thank you both! |
Use PidfdChildWatcher if os.pidfd_open is available and works, and otherwise use ThreadedChildWatcher which should work in any case.
Fixes #583