Closed
Description
Describe the bug
The "signal" symbol seems to be conflicting with the standard library's "signal" module.
To Reproduce
Running the testsuite in a clean Debian unstable chroot, as part of building the .deb package.
Expected behavior
Testsuite proceeds and succeeds :-)
Screenshots
Here's the part where the package build runs the testsuite:
make[1]: Entering directory '/build/datalab-0.16.1'
set -e; for v in $(py3versions -vs) ; do HOME=$(mktemp -d);trap "rm -rf $HOME" EXIT;cd /build/datalab-0.16.1/.pybuild/cpython3_${v}_datalab/build ; PYTHONPATH=. xvfb-run python$v ./cdl/tests/all_tests.py && rm -r $HOME ; done
QStandardPaths: error creating runtime directory '/run/user/1001' (No such file or directory)
QStandardPaths: error creating runtime directory '/run/user/1001' (No such file or directory)
Qt: Session management error: None of the authentication protocols specified are supported
Traceback (most recent call last):
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/tests/features/tour_unit_test.py", line 22, in <module>
test_tour()
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/tests/features/tour_unit_test.py", line 17, in test_tour
with cdltest_app_context() as win:
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/tests/__init__.py", line 56, in cdltest_app_context
win = CDLMainWindow(console=console)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/main.py", line 193, in __init__
self.setup(console)
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/main.py", line 699, in setup
self.__add_signal_image_panels()
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/main.py", line 909, in __add_signal_image_panels
cdock = self.__add_dockwidget(self.__add_signal_panel(), title=_("Signal View"))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/main.py", line 863, in __add_signal_panel
self.signalpanel = signal.SignalPanel(self, dpw, self.signalpanel_toolbar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/panel/signal.py", line 75, in __init__
self.processor = SignalProcessor(self, dockableplotwidget.plotwidget)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/processor/base.py", line 176, in __init__
self.set_process_isolation_enabled(Conf.main.process_isolation_enabled.get())
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/processor/base.py", line 193, in set_process_isolation_enabled
self.worker.create_pool()
File "/build/datalab-0.16.1/.pybuild/cpython3_3.11_datalab/build/cdl/core/gui/processor/base.py", line 95, in create_pool
POOL = Pool(processes=1) # pylint: disable=not-callable,consider-using-with
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/pool.py", line 191, in __init__
self._setup_queues()
File "/usr/lib/python3.11/multiprocessing/pool.py", line 346, in _setup_queues
self._inqueue = self._ctx.SimpleQueue()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/context.py", line 113, in SimpleQueue
return SimpleQueue(ctx=self.get_context())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/queues.py", line 341, in __init__
self._rlock = ctx.Lock()
^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/context.py", line 68, in Lock
return Lock(ctx=self.get_context())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/synchronize.py", line 169, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/usr/lib/python3.11/multiprocessing/synchronize.py", line 79, in __init__
from .resource_tracker import register
File "/usr/lib/python3.11/multiprocessing/resource_tracker.py", line 30, in <module>
_IGNORED_SIGNALS = (signal.SIGINT, signal.SIGTERM)
^^^^^^^^^^^^^
AttributeError: module 'signal' has no attribute 'SIGINT'
Installation information
Building from the 0.16.1 release, no patches.
Additional context
I suspect that the "signal" module that "multiprocessing" tries to use is actually one provided by Datalab rather than the one in the Python standard library. So either something's not tight enough when isolating the scope of the imports, or maybe it would be better to rename the "signal" submodules in Datalab.