You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytest: 0.4.0
bokeh: 2.2.3
Platform + Python: Windows + Python 3.7. Also seen the same error (in non isolated setup) in Linux + Python 3.6, and OSX + Python 3.8 CI environments.
The text was updated successfully, but these errors were encountered:
Reading the stack trace, it looks like bokeh is using asyncio under the hood. Preliminary support for asyncio was added in #63 - and we specifically don't have full support for Windows yet, since Windows doesn't use UNIX sockets, and we excluded the async tests from the Windows test suite.
I haven't had time to fully check out the provided test case and reproduce yet, but will try to get to it soon!
I had some suspicion that the problem could be Windows-specific, but am not sure.
The isolated test supplied here was based on an actual test that had more moving parts. For the actual test, it failed with the same error on Windows, Linux and OSX CI environments. (I did not get to run the isolated test in CI, however.)
So while it was plausible that the original actual test failed in CI for some other reasons, it could also be an indicator that the problem is not Windows-specific. I just don't know.
E.g., in this test run on linux with python 3.6. The test was started by
poetry run pytest --disable-socket --allow-unix-socket
Tests that need bokeh server still failed. The same SocketBlockedError was raised when bokeh's show() function was called. See line 216 of the log for an example.
I have been reworking some of the dependency logic in the plugin, and have used your example to confirm that the changes should now work for your example.
I'll be looking to release 0.50.0 with the changes soon! Closing this, but if it's still an issue with 0.50.0 (or you can try the main branch right now), please reopen!
For tests that involve creating a bokeh server, if I pass the command line options:
--allow-unix-socket
and / or,--allow-hosts=127.0.0.1,localhost,::1
the test still failed complaining that the sockets are blocked.
A workaround: if I mark individual tests with
@pytest.mark.enable_socket
, then the test will correctly pass.Example test:
If I run the command
> pytest tests/test_bokeh.py --disable-socket --allow-unix-socket --allow-hosts=127.0.0.1,localhost,::1
The test will fail with the following exception:
pytest: 0.4.0
bokeh: 2.2.3
Platform + Python: Windows + Python 3.7. Also seen the same error (in non isolated setup) in Linux + Python 3.6, and OSX + Python 3.8 CI environments.
The text was updated successfully, but these errors were encountered: