Closed asmeurer closed 2 years ago
The test_ipython failures are like
________ sympy/interactive/tests/test_ipython.py:test_automatic_symbols ________
Traceback (most recent call last):
File "/lib/python3.10/site-packages/sympy/interactive/tests/test_ipython.py", line 33, in test_automatic_symbols
app = init_ipython_session()
File "/lib/python3.10/site-packages/sympy/interactive/session.py", line 250, in init_ipython_session
app.initialize(argv)
File "/lib/python3.10/site-packages/traitlets/config/application.py", line 88, in inner
return method(app, *args, **kwargs)
File "/lib/python3.10/site-packages/IPython/terminal/ipapp.py", line 279, in initialize
self.init_shell()
File "/lib/python3.10/site-packages/IPython/terminal/ipapp.py", line 293, in init_shell
self.shell = self.interactive_shell_class.instance(parent=self,
File "/lib/python3.10/site-packages/traitlets/config/configurable.py", line 549, in instance
raise MultipleInstanceError(
traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'TerminalInteractiveShell' is already instanciated as singleton: Interpreter
They seem to be related to the fact that we are running the tests from inside of jupyterlite.
The matrices error is
____________ sympy/matrices/tests/test_matrices.py:test_issue_19809 ____________
Traceback (most recent call last):
File "/lib/python3.10/site-packages/sympy/matrices/tests/test_matrices.py", line 2994, in test_issue_19809
future = executor.submit(f)
File "/lib/python3.10/concurrent/futures/thread.py", line 176, in submit
self._adjust_thread_count()
File "/lib/python3.10/concurrent/futures/thread.py", line 199, in _adjust_thread_count
t.start()
File "/lib/python3.10/threading.py", line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
So it's trying to use threading, which isn't supported. We might want to disable this test in pyodide (or any other environment that doesn't have threading).
I haven't yet tried running any of the tests past the point where it stopped above. Interrupting the kernel doesn't seem to work very well in jupyterlite, so it's hard to tell where it is hanging.
But aside from the hanging test, everything seems to be working.
Now that SymPy Live is moving to jupyterlite, we should make sure the SymPy tests pass on pyodide.
The version of SymPy on SymPy Live has the tests stripped. I also found that you have to do some workarounds to get the tests to work in jupytelite.
So far I have this
I ran this in a notebook at https://jupyterlite.readthedocs.io/en/latest/_static/lab/index.html and it got this far before hanging
I ran it again and it got to that same spot and hung, so I think there is some issue there.
We need to
sympy.test()
and have it work in pyodide.Likely many issues will actually be issues with pyodide upstream (like the
sys.stdout.encoding
thing), so we should report those as we find them, and work around them if it isn't too hard.