-
Notifications
You must be signed in to change notification settings - Fork 305
Drop 3.9, Start testing on 3.14 and 3.14-free-threaded, get tests passing again #1076
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
Conversation
e57ecba to
338dd19
Compare
|
I do not know how to handle or debug the remaining failures. |
|
@Carreau want me to take this one over? I can have a stab at it. |
|
Sure, and feel free to push on my branch. I'm debugging some issues on pytest-jupyter as well. It might be due to the Event Loop policies deprecation warnings that are the source of the issue. |
not really for runtime, but needed for compatibility with recent pytest
sometimes it just ignores it (Free threaded)
|
should all those non-closed sockets and open/close pairs become context manager (in a perfect world). |
Yes, KernelManager and KernelClient should both be context managers. zmq sockets are already context managers and have been for some time |
don't override hatch doesn't work on windows, let it do the wrong thing
improves cleanup
startup sequence seems really slow now
|
Restarted MacOS test, failure was intermittent. |
Carreau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, a couple of questions, but good as is.
| hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf | ||
| - name: Run the tests on pypy | ||
| echo "PYTEST_ADDOPTS=${PYTEST_ADDOPTS:-} -W default" >> $GITHUB_ENV | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want this to be permanent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is not a change, it simplifies the 3 different test invocations below by setting the options before using the same pytest invocation.
Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
|
green again. One flaky test, still, but passed on re-run. |
The change in PR #1076 added 'finally: loop.close()' to IOLoopThread.run(), which closes the asyncio event loop before ZMQ streams have been properly unregistered. This caused errors during teardown when downstream projects like qtconsole tried to check if channels were closed. The fix ensures that channel streams are explicitly closed (via close()) while the ioloop is still running, before calling stop_channels() on the parent class and stopping the ioloop thread. This allows the ZMQ streams to be properly unregistered from the event loop before it's closed.
The change in PR #1076 added 'finally: loop.close()' to IOLoopThread.run(), which closes the asyncio event loop before ZMQ streams have been properly unregistered. This caused errors during teardown when downstream projects like qtconsole tried to check if channels were closed. The fix ensures that channel streams are explicitly closed (via close()) while the ioloop is still running, before calling stop_channels() on the parent class and stopping the ioloop thread. This allows the ZMQ streams to be properly unregistered from the event loop before it's closed.
…1089) * Fix channel cleanup by closing streams before stopping ioloop thread The change in PR #1076 added 'finally: loop.close()' to IOLoopThread.run(), which closes the asyncio event loop before ZMQ streams have been properly unregistered. This caused errors during teardown when downstream projects like qtconsole tried to check if channels were closed. The fix ensures that channel streams are explicitly closed (via close()) while the ioloop is still running, before calling stop_channels() on the parent class and stopping the ioloop thread. This allows the ZMQ streams to be properly unregistered from the event loop before it's closed. * Fix _exiting to be instance variable, not shared class variable The _exiting flag was defined as a class variable, meaning when one IOLoopThread called stop() and set _exiting = True, it affected ALL IOLoopThread instances. This caused subsequent kernels to fail to start because _async_run() would immediately exit. By initializing self._exiting = False in __init__, each IOLoopThread instance now has its own exit flag. The class-level _exiting is still used by _notice_exit() for interpreter shutdown cleanup.
No description provided.