Issue 28668: instanciation of multiprocessing.Queue raises ImportError in test_logging (original) (raw)

Occurs on Android that has a broken shared semaphore implementation (issue 26924). Patch attached.

One of the backtraces:

====================================================================== ERROR: test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest)

Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/multiprocessing/synchronize.py", line 29, in from _multiprocessing import SemLock, sem_unlink ImportError: cannot import name 'sem_unlink'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/unittest/mock.py", line 1179, in patched return func(*args, **keywargs) File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_logging.py", line 3130, in test_handle_c alled_with_mp_queue log_queue = multiprocessing.Queue() File "/sdcard/org.bitbucket.pyona/lib/python3.7/multiprocessing/context.py", line 102, in Queue return Queue(maxsize, ctx=self.get_context()) File "/sdcard/org.bitbucket.pyona/lib/python3.7/multiprocessing/queues.py", line 39, in init from .synchronize import SEM_VALUE_MAX as maxsize File "/sdcard/org.bitbucket.pyona/lib/python3.7/multiprocessing/synchronize.py", line 34, in " function, see issue 3770.") ImportError: This platform lacks a functioning sem_open implementation, therefore, the required sync hronization primitives needed will not function, see issue 3770.