In order to let us help you better, please fill out the following fields as best you can:
I am...
[X ] Reporting a bug
I am running...
Errbot version: 6.1.7
OS version: Ubuntu 18.04.5 LTS
Python version: 3.8.6 and 3.9.1
Using a virtual environment: yes
Issue description
Unit tests running on Python 3.6 and 3.7 complete without warnings. The same unit tests run on Python 3.8 or Python 3.9 are returning exceptions:
=============================== warnings summary ===============================
tests/commands_test.py::test_backup
/home/runner/work/errbot/errbot/.tox/py/lib/python3.9/site-packages/_pytest/threadexception.py:75: PytestUnhandledThreadExceptionWarning: Exception in thread TestBot main thread
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/runner/work/errbot/errbot/errbot/backends/test.py", line 298, in serve_forever
self.shutdown()
File "/home/runner/work/errbot/errbot/errbot/core.py", line 805, in shutdown
self.close_storage()
File "/home/runner/work/errbot/errbot/errbot/storage/__init__.py", line 39, in close_storage
raise StoreNotOpenError("Storage does not appear to have been opened yet")
errbot.storage.StoreNotOpenError: Storage does not appear to have been opened yet
warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))
and
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================= 216 passed, 1 warning in 26.91s ========================
Exception ignored in: <function Pool.__del__ at 0x7f16c52cdca0>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/pool.py", line 268, in __del__
self._change_notifier.put(None)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/queues.py", line 378, in put
self._writer.send_bytes(obj)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 416, in _send_bytes
self._send(header + buf)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor
Exception ignored in: <function Pool.__del__ at 0x7f16c52cdca0>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/pool.py", line 268, in __del__
self._change_notifier.put(None)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/queues.py", line 378, in put
self._writer.send_bytes(obj)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 416, in _send_bytes
self._send(header + buf)
File "/opt/hostedtoolcache/Python/3.9.1/x64/lib/python3.9/multiprocessing/connection.py", line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor
This seems to suggest there have been threading changes between 3.7 and 3.8 that need to be taken into account.
In order to let us help you better, please fill out the following fields as best you can:
I am...
I am running...
Issue description
Unit tests running on Python 3.6 and 3.7 complete without warnings. The same unit tests run on Python 3.8 or Python 3.9 are returning exceptions:
and
This seems to suggest there have been threading changes between 3.7 and 3.8 that need to be taken into account.
Steps to reproduce
Run unit tests using Python 3.8 or Python 3.9