>>> py3-loguru: Building community/py3-loguru 0.7.2-r2 (using abuild 3.15.0-r0) started Sun, 12 Oct 2025 20:03:43 +0000 >>> py3-loguru: Validating /home/udu/aports/community/py3-loguru/APKBUILD... >>> py3-loguru: Analyzing dependencies... >>> py3-loguru: Installing for build: build-base python3 py3-colorama py3-gpep517 py3-setuptools py3-wheel py3-pytest py3-freezegun py3-mypy WARNING: opening /home/udu/packages//community: No such file or directory WARNING: opening /home/udu/packages//main: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz (1/35) Installing py3-colorama (0.4.6-r5) (2/35) Installing py3-colorama-pyc (0.4.6-r5) (3/35) Installing py3-installer (0.7.0-r2) (4/35) Installing py3-installer-pyc (0.7.0-r2) (5/35) Installing py3-gpep517 (19-r0) (6/35) Installing py3-gpep517-pyc (19-r0) (7/35) Installing py3-parsing (3.2.3-r0) (8/35) Installing py3-parsing-pyc (3.2.3-r0) (9/35) Installing py3-packaging (25.0-r0) (10/35) Installing py3-packaging-pyc (25.0-r0) (11/35) Installing py3-setuptools (80.9.0-r0) (12/35) Installing py3-setuptools-pyc (80.9.0-r0) (13/35) Installing py3-wheel (0.46.1-r0) (14/35) Installing py3-wheel-pyc (0.46.1-r0) (15/35) Installing py3-iniconfig (2.1.0-r0) (16/35) Installing py3-iniconfig-pyc (2.1.0-r0) (17/35) Installing py3-pluggy (1.5.0-r0) (18/35) Installing py3-pluggy-pyc (1.5.0-r0) (19/35) Installing py3-py (1.11.0-r4) (20/35) Installing py3-py-pyc (1.11.0-r4) (21/35) Installing py3-pytest (8.3.5-r0) (22/35) Installing py3-pytest-pyc (8.3.5-r0) (23/35) Installing py3-six (1.17.0-r0) (24/35) Installing py3-six-pyc (1.17.0-r0) (25/35) Installing py3-dateutil (2.9.0-r1) (26/35) Installing py3-dateutil-pyc (2.9.0-r1) (27/35) Installing py3-freezegun (1.5.1-r0) (28/35) Installing py3-freezegun-pyc (1.5.1-r0) (29/35) Installing py3-mypy-extensions (1.0.0-r3) (30/35) Installing py3-mypy-extensions-pyc (1.0.0-r3) (31/35) Installing py3-typing-extensions (4.13.2-r0) (32/35) Installing py3-typing-extensions-pyc (4.13.2-r0) (33/35) Installing py3-mypy (1.15.0-r0) (34/35) Installing py3-mypy-pyc (1.15.0-r0) (35/35) Installing .makedepends-py3-loguru (20251012.200344) Executing busybox-1.37.0-r19.trigger OK: 326 MiB in 124 packages >>> py3-loguru: Cleaning up srcdir >>> py3-loguru: Cleaning up pkgdir >>> py3-loguru: Cleaning up tmpdir >>> py3-loguru: Fetching loguru-0.7.2.tar.gz::https://github.com/Delgan/loguru/archive/refs/tags/0.7.2.tar.gz >>> py3-loguru: Fetching loguru-0.7.2.tar.gz::https://github.com/Delgan/loguru/archive/refs/tags/0.7.2.tar.gz >>> py3-loguru: Checking sha512sums... loguru-0.7.2.tar.gz: OK >>> py3-loguru: Unpacking /var/cache/distfiles/loguru-0.7.2.tar.gz... 2025-10-12 20:03:45,515 gpep517 INFO Building wheel via backend setuptools.build_meta:__legacy__ /usr/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() 2025-10-12 20:03:45,549 root INFO running bdist_wheel 2025-10-12 20:03:45,569 root INFO running build 2025-10-12 20:03:45,569 root INFO running build_py 2025-10-12 20:03:45,574 root INFO creating build/lib/loguru 2025-10-12 20:03:45,574 root INFO copying loguru/_colorizer.py -> build/lib/loguru 2025-10-12 20:03:45,574 root INFO copying loguru/_filters.py -> build/lib/loguru 2025-10-12 20:03:45,575 root INFO copying loguru/_file_sink.py -> build/lib/loguru 2025-10-12 20:03:45,575 root INFO copying loguru/_colorama.py -> build/lib/loguru 2025-10-12 20:03:45,575 root INFO copying loguru/_error_interceptor.py -> build/lib/loguru 2025-10-12 20:03:45,575 root INFO copying loguru/_get_frame.py -> build/lib/loguru 2025-10-12 20:03:45,576 root INFO copying loguru/_asyncio_loop.py -> build/lib/loguru 2025-10-12 20:03:45,576 root INFO copying loguru/_datetime.py -> build/lib/loguru 2025-10-12 20:03:45,576 root INFO copying loguru/_locks_machinery.py -> build/lib/loguru 2025-10-12 20:03:45,576 root INFO copying loguru/_better_exceptions.py -> build/lib/loguru 2025-10-12 20:03:45,576 root INFO copying loguru/_contextvars.py -> build/lib/loguru 2025-10-12 20:03:45,577 root INFO copying loguru/_simple_sinks.py -> build/lib/loguru 2025-10-12 20:03:45,577 root INFO copying loguru/__init__.py -> build/lib/loguru 2025-10-12 20:03:45,577 root INFO copying loguru/_ctime_functions.py -> build/lib/loguru 2025-10-12 20:03:45,577 root INFO copying loguru/_string_parsers.py -> build/lib/loguru 2025-10-12 20:03:45,577 root INFO copying loguru/_handler.py -> build/lib/loguru 2025-10-12 20:03:45,578 root INFO copying loguru/_logger.py -> build/lib/loguru 2025-10-12 20:03:45,578 root INFO copying loguru/_defaults.py -> build/lib/loguru 2025-10-12 20:03:45,578 root INFO copying loguru/_recattrs.py -> build/lib/loguru 2025-10-12 20:03:45,579 root INFO copying loguru/__init__.pyi -> build/lib/loguru 2025-10-12 20:03:45,579 root INFO copying loguru/py.typed -> build/lib/loguru 2025-10-12 20:03:45,588 root INFO installing to build/bdist.linux-x86_64/wheel 2025-10-12 20:03:45,588 root INFO running install 2025-10-12 20:03:45,598 root INFO running install_lib 2025-10-12 20:03:45,602 root INFO creating build/bdist.linux-x86_64/wheel 2025-10-12 20:03:45,603 root INFO creating build/bdist.linux-x86_64/wheel/loguru 2025-10-12 20:03:45,603 root INFO copying build/lib/loguru/py.typed -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,603 root INFO copying build/lib/loguru/_colorizer.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,603 root INFO copying build/lib/loguru/_filters.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_file_sink.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_colorama.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_error_interceptor.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_get_frame.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/__init__.pyi -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_asyncio_loop.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,604 root INFO copying build/lib/loguru/_datetime.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_locks_machinery.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_better_exceptions.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_contextvars.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_simple_sinks.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/__init__.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_ctime_functions.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_string_parsers.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,605 root INFO copying build/lib/loguru/_handler.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,606 root INFO copying build/lib/loguru/_logger.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,606 root INFO copying build/lib/loguru/_defaults.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,606 root INFO copying build/lib/loguru/_recattrs.py -> build/bdist.linux-x86_64/wheel/./loguru 2025-10-12 20:03:45,606 root INFO running install_egg_info 2025-10-12 20:03:45,610 root INFO running egg_info 2025-10-12 20:03:45,613 root INFO creating loguru.egg-info 2025-10-12 20:03:45,613 root INFO writing loguru.egg-info/PKG-INFO 2025-10-12 20:03:45,620 root INFO writing dependency_links to loguru.egg-info/dependency_links.txt 2025-10-12 20:03:45,624 root INFO writing requirements to loguru.egg-info/requires.txt 2025-10-12 20:03:45,624 root INFO writing top-level names to loguru.egg-info/top_level.txt 2025-10-12 20:03:45,625 root INFO writing manifest file 'loguru.egg-info/SOURCES.txt' 2025-10-12 20:03:45,629 root INFO reading manifest file 'loguru.egg-info/SOURCES.txt' 2025-10-12 20:03:45,629 root INFO reading manifest template 'MANIFEST.in' 2025-10-12 20:03:45,642 root INFO adding license file 'LICENSE' 2025-10-12 20:03:45,646 root INFO writing manifest file 'loguru.egg-info/SOURCES.txt' 2025-10-12 20:03:45,647 root INFO Copying loguru.egg-info to build/bdist.linux-x86_64/wheel/./loguru-0.7.2-py3.12.egg-info 2025-10-12 20:03:45,648 root INFO running install_scripts 2025-10-12 20:03:45,650 root INFO creating build/bdist.linux-x86_64/wheel/loguru-0.7.2.dist-info/WHEEL 2025-10-12 20:03:45,650 wheel INFO creating '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/.dist/.tmp-e2_koz0a/loguru-0.7.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it 2025-10-12 20:03:45,651 wheel INFO adding 'loguru/__init__.py' 2025-10-12 20:03:45,651 wheel INFO adding 'loguru/__init__.pyi' 2025-10-12 20:03:45,651 wheel INFO adding 'loguru/_asyncio_loop.py' 2025-10-12 20:03:45,652 wheel INFO adding 'loguru/_better_exceptions.py' 2025-10-12 20:03:45,652 wheel INFO adding 'loguru/_colorama.py' 2025-10-12 20:03:45,652 wheel INFO adding 'loguru/_colorizer.py' 2025-10-12 20:03:45,652 wheel INFO adding 'loguru/_contextvars.py' 2025-10-12 20:03:45,652 wheel INFO adding 'loguru/_ctime_functions.py' 2025-10-12 20:03:45,653 wheel INFO adding 'loguru/_datetime.py' 2025-10-12 20:03:45,653 wheel INFO adding 'loguru/_defaults.py' 2025-10-12 20:03:45,653 wheel INFO adding 'loguru/_error_interceptor.py' 2025-10-12 20:03:45,653 wheel INFO adding 'loguru/_file_sink.py' 2025-10-12 20:03:45,653 wheel INFO adding 'loguru/_filters.py' 2025-10-12 20:03:45,654 wheel INFO adding 'loguru/_get_frame.py' 2025-10-12 20:03:45,654 wheel INFO adding 'loguru/_handler.py' 2025-10-12 20:03:45,654 wheel INFO adding 'loguru/_locks_machinery.py' 2025-10-12 20:03:45,654 wheel INFO adding 'loguru/_logger.py' 2025-10-12 20:03:45,655 wheel INFO adding 'loguru/_recattrs.py' 2025-10-12 20:03:45,655 wheel INFO adding 'loguru/_simple_sinks.py' 2025-10-12 20:03:45,655 wheel INFO adding 'loguru/_string_parsers.py' 2025-10-12 20:03:45,655 wheel INFO adding 'loguru/py.typed' 2025-10-12 20:03:45,656 wheel INFO adding 'loguru-0.7.2.dist-info/licenses/LICENSE' 2025-10-12 20:03:45,656 wheel INFO adding 'loguru-0.7.2.dist-info/METADATA' 2025-10-12 20:03:45,656 wheel INFO adding 'loguru-0.7.2.dist-info/WHEEL' 2025-10-12 20:03:45,656 wheel INFO adding 'loguru-0.7.2.dist-info/top_level.txt' 2025-10-12 20:03:45,656 wheel INFO adding 'loguru-0.7.2.dist-info/RECORD' 2025-10-12 20:03:45,657 root INFO removing build/bdist.linux-x86_64/wheel 2025-10-12 20:03:45,658 gpep517 INFO The backend produced .dist/loguru-0.7.2-py3-none-any.whl loguru-0.7.2-py3-none-any.whl ============================= test session starts ============================== platform linux -- Python 3.12.11, pytest-8.3.5, pluggy-1.5.0 rootdir: /home/udu/aports/community/py3-loguru/src/loguru-0.7.2 configfile: tox.ini testpaths: tests collected 1497 items tests/test_activation.py .............................. [ 2%] tests/test_add_option_backtrace.py . [ 2%] tests/test_add_option_catch.py .......F.FF [ 2%] tests/test_add_option_colorize.py ................. [ 3%] tests/test_add_option_context.py FFFFFFF.... [ 4%] tests/test_add_option_diagnose.py . [ 4%] tests/test_add_option_enqueue.py FFFFFFFFFFFFFFF [ 5%] tests/test_add_option_filter.py ........................................ [ 8%] ............... [ 9%] tests/test_add_option_format.py .................... [ 10%] tests/test_add_option_kwargs.py ........ [ 11%] tests/test_add_option_level.py .......... [ 11%] tests/test_add_option_serialize.py ......... [ 12%] tests/test_add_sinks.py ................................................ [ 15%] ....... [ 16%] tests/test_ansimarkup_basic.py ......................................... [ 18%] ............................................... [ 22%] tests/test_ansimarkup_extended.py ...................................... [ 24%] ...................................................... [ 28%] tests/test_bind.py ......... [ 28%] tests/test_colorama.py ssss..............sssss..............ssssssssssss [ 32%] sss [ 32%] tests/test_configure.py ................ [ 33%] tests/test_contextualize.py .............. [ 34%] tests/test_coroutine_sink.py ......................FF.......F. [ 36%] tests/test_datetime.py ......................................... [ 39%] tests/test_deepcopy.py .... [ 39%] tests/test_defaults.py ............. [ 40%] tests/test_exceptions_catch.py ......................................... [ 43%] ......... [ 43%] tests/test_exceptions_formatting.py .....FF............................. [ 46%] .....................................................s [ 49%] tests/test_filesink_compression.py ..................................... [ 52%] ................. [ 53%] tests/test_filesink_delay.py .......... [ 54%] tests/test_filesink_permissions.py .......... [ 54%] tests/test_filesink_retention.py ....................................... [ 57%] .......... [ 57%] tests/test_filesink_rotation.py ........................................ [ 60%] ......................................................sss............... [ 65%] ........................ [ 67%] tests/test_filesink_watch.py .............. [ 68%] tests/test_formatting.py ............................................... [ 71%] ................................ [ 73%] tests/test_get_frame.py ... [ 73%] tests/test_interception.py ............ [ 74%] tests/test_levels.py ................................................ [ 77%] tests/test_locks.py ..... [ 77%] tests/test_multiprocessing.py FFFFFFFFFFFFFFFFFFFFFF.F.F.F [ 79%] tests/test_opt.py ...................................................... [ 83%] ........................................................................ [ 88%] ........................ [ 89%] tests/test_parse.py ......................... [ 91%] tests/test_patch.py ........ [ 91%] tests/test_pickling.py ................................................. [ 95%] .... [ 95%] tests/test_propagation.py ...... [ 95%] tests/test_recattr.py ......... [ 96%] tests/test_remove.py ..FF....... [ 97%] tests/test_repr.py .................... [ 98%] tests/test_standard_handler.py ................ [ 99%] tests/test_threading.py ..... [ 99%] tests/test_type_hinting.py . [100%] =================================== FAILURES =================================== ________________________ test_broken_sink_message[True] ________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128b24a750> enqueue = True > ??? capsys = <_pytest.capture.CaptureFixture object at 0x79128b24a750> enqueue = True tests/test_add_option_catch.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'broken_sink' self = serialize = False sink = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'broken_sink' self = (id=0, level=10, sink=broken_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError __________________ test_broken_sink_caught_keep_working[True] __________________ enqueue = True @pytest.mark.parametrize("enqueue", [False, True]) def test_broken_sink_caught_keep_working(enqueue): output = "" def half_broken_sink(m): nonlocal output if m.startswith("NOK"): raise ValueError("Broken!") else: output += m > logger.add(half_broken_sink, format="{message}", enqueue=enqueue, catch=True) enqueue = True half_broken_sink = .half_broken_sink at 0x79128b3d6980> output = '' tests/test_add_option_catch.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'half_broken_sink' self = serialize = False sink = .half_broken_sink at 0x79128b3d6980> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'half_broken_sink' self = (id=0, level=10, sink=half_broken_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_broken_sink_not_caught_enqueue ______________________ def test_broken_sink_not_caught_enqueue(): called = 0 def broken_sink(m): nonlocal called called += 1 raise ValueError("Nop") > logger.add(broken_sink, format="{message}", enqueue=True, catch=False) broken_sink = .broken_sink at 0x79128b3d6fc0> called = 0 tests/test_add_option_catch.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'broken_sink' self = serialize = False sink = .broken_sink at 0x79128b3d6fc0> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'broken_sink' self = (id=0, level=10, sink=broken_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________ test_using_multiprocessing_directly_if_context_is_none ____________ @pytest.mark.usefixtures("reset_start_method") def test_using_multiprocessing_directly_if_context_is_none(): > logger.add(lambda _: None, enqueue=True, context=None) tests/test_add_option_context.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b418900> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________ test_fork_context_as_string[fork] _______________________ context_name = 'fork' @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.parametrize("context_name", ["fork", "forkserver"]) def test_fork_context_as_string(context_name): context = multiprocessing.get_context(context_name) with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context=context_name, enqueue=True) context = context_name = 'fork' mock = tests/test_add_option_context.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b3d7a60> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________________ test_fork_context_as_string[forkserver] ____________________ context_name = 'forkserver' @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.parametrize("context_name", ["fork", "forkserver"]) def test_fork_context_as_string(context_name): context = multiprocessing.get_context(context_name) with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context=context_name, enqueue=True) context = context_name = 'forkserver' mock = tests/test_add_option_context.py:27: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b3d77e0> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_spawn_context_as_string _________________________ def test_spawn_context_as_string(): context = multiprocessing.get_context("spawn") with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context="spawn", enqueue=True) context = mock = tests/test_add_option_context.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b3d7240> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________ test_fork_context_as_object[fork] _______________________ context_name = 'fork' @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.parametrize("context_name", ["fork", "forkserver"]) def test_fork_context_as_object(context_name): context = multiprocessing.get_context(context_name) with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context=context, enqueue=True) context = context_name = 'fork' mock = tests/test_add_option_context.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b4184a0> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________________ test_fork_context_as_object[forkserver] ____________________ context_name = 'forkserver' @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.parametrize("context_name", ["fork", "forkserver"]) def test_fork_context_as_object(context_name): context = multiprocessing.get_context(context_name) with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context=context, enqueue=True) context = context_name = 'forkserver' mock = tests/test_add_option_context.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b3d72e0> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_spawn_context_as_object _________________________ def test_spawn_context_as_object(): context = multiprocessing.get_context("spawn") with patch.object(type(context), "Lock", wraps=context.Lock) as mock: > logger.add(lambda _: None, context=context, enqueue=True) context = mock = tests/test_add_option_context.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128b3d7ba0> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/unittest/mock.py:1139: in __call__ return self._mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1143: in _mock_call return self._execute_mock_call(*args, **kwargs) args = () kwargs = {} self = /usr/lib/python3.12/unittest/mock.py:1216: in _execute_mock_call return self._mock_wraps(*args, **kwargs) args = () effect = None kwargs = {} self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________________ test_enqueue _________________________________ def test_enqueue(): x = [] def sink(message): time.sleep(0.1) x.append(message) > logger.add(sink, format="{message}", enqueue=True) sink = .sink at 0x79128b418040> x = [] tests/test_add_option_enqueue.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b418040> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_enqueue_with_exception __________________________ def test_enqueue_with_exception(): x = [] def sink(message): time.sleep(0.1) x.append(message) > logger.add(sink, format="{message}", enqueue=True) sink = .sink at 0x79128b419c60> x = [] tests/test_add_option_enqueue.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b419c60> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _______________________ test_caught_exception_queue_put ________________________ writer = .w at 0x79128b419a80> capsys = <_pytest.capture.CaptureFixture object at 0x79128acd1c40> def test_caught_exception_queue_put(writer, capsys): > logger.add(writer, enqueue=True, catch=True, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128acd1c40> writer = .w at 0x79128b419a80> tests/test_add_option_enqueue.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128b419a80> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _______________________ test_caught_exception_queue_get ________________________ writer = .w at 0x79128b41a340> capsys = <_pytest.capture.CaptureFixture object at 0x79128ad19b80> def test_caught_exception_queue_get(writer, capsys): > logger.add(writer, enqueue=True, catch=True, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad19b80> writer = .w at 0x79128b41a340> tests/test_add_option_enqueue.py:109: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128b41a340> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _______________________ test_caught_exception_sink_write _______________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128b249e50> def test_caught_exception_sink_write(capsys): > logger.add(NotWritable(), enqueue=True, catch=True, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128b249e50> tests/test_add_option_enqueue.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_not_caught_exception_queue_put ______________________ writer = .w at 0x79128b41aa20> capsys = <_pytest.capture.CaptureFixture object at 0x79128ad1a3c0> def test_not_caught_exception_queue_put(writer, capsys): > logger.add(writer, enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad1a3c0> writer = .w at 0x79128b41aa20> tests/test_add_option_enqueue.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128b41aa20> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_not_caught_exception_queue_get ______________________ writer = .w at 0x79128b41a0c0> capsys = <_pytest.capture.CaptureFixture object at 0x79128ad05fa0> def test_not_caught_exception_queue_get(writer, capsys): > logger.add(writer, enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad05fa0> writer = .w at 0x79128b41a0c0> tests/test_add_option_enqueue.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128b41a0c0> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_not_caught_exception_sink_write _____________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ad1a0f0> def test_not_caught_exception_sink_write(capsys): > logger.add(NotWritable(), enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad1a0f0> tests/test_add_option_enqueue.py:179: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________ test_not_caught_exception_sink_write_then_complete ______________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ad074d0> def test_not_caught_exception_sink_write_then_complete(capsys): > logger.add(NotWritable(), enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad074d0> tests/test_add_option_enqueue.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________ test_not_caught_exception_queue_get_then_complete _______________ writer = .w at 0x79128b41b380> capsys = <_pytest.capture.CaptureFixture object at 0x79128ad06ff0> def test_not_caught_exception_queue_get_then_complete(writer, capsys): > logger.add(writer, enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128ad06ff0> writer = .w at 0x79128b41b380> tests/test_add_option_enqueue.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128b41b380> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_wait_for_all_messages_enqueued ______________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128acd3830> def test_wait_for_all_messages_enqueued(capsys): def slow_sink(message): time.sleep(0.01) sys.stderr.write(message) > logger.add(slow_sink, enqueue=True, catch=False, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128acd3830> slow_sink = .slow_sink at 0x79128b41b240> tests/test_add_option_enqueue.py:238: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'slow_sink' self = serialize = False sink = .slow_sink at 0x79128b41b240> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'slow_sink' self = (id=0, level=10, sink=slow_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________ test_logging_not_picklable_exception[exception_value0] ____________ exception_value = @pytest.mark.parametrize("exception_value", [NotPicklable(), NotPicklableTypeError()]) def test_logging_not_picklable_exception(exception_value): exception = None def sink(message): nonlocal exception exception = message.record["exception"] > logger.add(sink, enqueue=True, catch=False) exception = None exception_value = sink = .sink at 0x79128b0e5bc0> tests/test_add_option_enqueue.py:259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b0e5bc0> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________ test_logging_not_picklable_exception[exception_value1] ____________ exception_value = @pytest.mark.parametrize("exception_value", [NotPicklable(), NotPicklableTypeError()]) def test_logging_not_picklable_exception(exception_value): exception = None def sink(message): nonlocal exception exception = message.record["exception"] > logger.add(sink, enqueue=True, catch=False) exception = None exception_value = sink = .sink at 0x79128b3d7420> tests/test_add_option_enqueue.py:259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b3d7420> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________ test_logging_not_unpicklable_exception[exception_value0] ___________ exception_value = @pytest.mark.parametrize("exception_value", [NotUnpicklable(), NotUnpicklableTypeError()]) def test_logging_not_unpicklable_exception(exception_value): exception = None def sink(message): nonlocal exception exception = message.record["exception"] > logger.add(sink, enqueue=True, catch=False) exception = None exception_value = sink = .sink at 0x79128b3d7a60> tests/test_add_option_enqueue.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b3d7a60> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________ test_logging_not_unpicklable_exception[exception_value1] ___________ exception_value = @pytest.mark.parametrize("exception_value", [NotUnpicklable(), NotUnpicklableTypeError()]) def test_logging_not_unpicklable_exception(exception_value): exception = None def sink(message): nonlocal exception exception = message.record["exception"] > logger.add(sink, enqueue=True, catch=False) exception = None exception_value = sink = .sink at 0x79128b3d6d40> tests/test_add_option_enqueue.py:282: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'sink' self = serialize = False sink = .sink at 0x79128b3d6d40> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'sink' self = (id=0, level=10, sink=sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_enqueue_coroutine_loop __________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4d370> @pytest.mark.skipif(sys.version_info < (3, 5, 3), reason="Coroutine can't access running loop") def test_enqueue_coroutine_loop(capsys): loop = asyncio.new_event_loop() > logger.add(async_writer, enqueue=True, loop=loop, format="{message}", catch=False) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4d370> loop = <_UnixSelectorEventLoop running=False closed=False debug=False> tests/test_coroutine_sink.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None coro = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'async_writer' self = serialize = False sink = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'async_writer' self = (id=0, level=10, sink=async_writer) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError __________ test_enqueue_coroutine_from_inside_coroutine_without_loop ___________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4d280> def test_enqueue_coroutine_from_inside_coroutine_without_loop(capsys): loop = asyncio.new_event_loop() async def worker(): logger.add(async_writer, enqueue=True, loop=None, format="{message}", catch=False) logger.info("A") await logger.complete() > loop.run_until_complete(worker()) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4d280> loop = <_UnixSelectorEventLoop running=False closed=False debug=False> worker = .worker at 0x79128ae479c0> tests/test_coroutine_sink.py:446: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/asyncio/base_events.py:691: in run_until_complete return future.result() future = .worker() done,...unity/py3-loguru/src/loguru-0.7.2/tests/test_coroutine_sink.py:441> exception=PermissionError(13, 'Permission denied')> new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> tests/test_coroutine_sink.py:442: in worker logger.add(async_writer, enqueue=True, loop=None, format="{message}", catch=False) loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = None coro = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'async_writer' self = serialize = False sink = terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'async_writer' self = (id=0, level=10, sink=async_writer) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _______________________ test_complete_with_sub_processes _______________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ad07f20> def test_complete_with_sub_processes(capsys): spawn_context = multiprocessing.get_context("spawn") loop = asyncio.new_event_loop() writer = Writer() > logger.add(writer.write, context=spawn_context, format="{message}", enqueue=True, loop=loop) capsys = <_pytest.capture.CaptureFixture object at 0x79128ad07f20> loop = <_UnixSelectorEventLoop running=False closed=False debug=False> spawn_context = writer = tests/test_coroutine_sink.py:657: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = coro = > diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'write' self = serialize = False sink = > terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'write' self = (id=0, level=10, sink=write) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________________________ test_backtrace[enqueue] ____________________________ filename = 'enqueue' @pytest.mark.parametrize( "filename", [ "chained_expression_direct", "chained_expression_indirect", "chaining_first", "chaining_second", "chaining_third", "enqueue", "enqueue_with_others_handlers", "frame_values_backward", "frame_values_forward", "function", "head_recursion", "missing_attributes_traceback_objects", "nested", "nested_chained_catch_up", "nested_decorator_catch_up", "nested_explicit_catch_up", "nested_wrapping", "no_tb", "not_enough_arguments", "raising_recursion", "suppressed_expression_direct", "suppressed_expression_indirect", "tail_recursion", "too_many_arguments", ], ) def test_backtrace(filename): > compare_exception("backtrace", filename) filename = 'enqueue' tests/test_exceptions_formatting.py:147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dirname = 'backtrace', filename = 'enqueue' def compare_exception(dirname, filename): cwd = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) python = sys.executable or "python" filepath = os.path.join("tests", "exceptions", "source", dirname, filename + ".py") outpath = os.path.join(cwd, "tests", "exceptions", "output", dirname, filename + ".txt") with subprocess.Popen( [python, filepath], shell=False, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, env=dict(os.environ, PYTHONPATH=cwd, PYTHONIOENCODING="utf8"), ) as proc: stdout, stderr = proc.communicate() print(stderr, file=sys.stderr) > assert proc.returncode == 0 E AssertionError: assert 1 == 0 E + where 1 = .returncode cwd = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2' dirname = 'backtrace' filename = 'enqueue' filepath = 'tests/exceptions/source/backtrace/enqueue.py' outpath = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/output/backtrace/enqueue.txt' proc = python = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/.testenv/bin/python3' stderr = 'Traceback (most recent call last):\n File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/s...ocessing.SemLock(\n ^^^^^^^^^^^^^^^^^^^^^^^^^\nPermissionError: [Errno 13] Permission denied\n' stdout = '' tests/test_exceptions_formatting.py:105: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/source/backtrace/enqueue.py", line 6, in logger.add(sys.stderr, enqueue=True, format="", colorize=False, backtrace=True, diagnose=False) File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/loguru/_logger.py", line 988, in add handler = Handler( ^^^^^^^^ File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/loguru/_handler.py", line 93, in __init__ self._queue = multiprocessing.SimpleQueue() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/context.py", line 113, in SimpleQueue return SimpleQueue(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/queues.py", line 363, in __init__ self._rlock = ctx.Lock() ^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/synchronize.py", line 169, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/usr/lib/python3.12/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( ^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied _________________ test_backtrace[enqueue_with_others_handlers] _________________ filename = 'enqueue_with_others_handlers' @pytest.mark.parametrize( "filename", [ "chained_expression_direct", "chained_expression_indirect", "chaining_first", "chaining_second", "chaining_third", "enqueue", "enqueue_with_others_handlers", "frame_values_backward", "frame_values_forward", "function", "head_recursion", "missing_attributes_traceback_objects", "nested", "nested_chained_catch_up", "nested_decorator_catch_up", "nested_explicit_catch_up", "nested_wrapping", "no_tb", "not_enough_arguments", "raising_recursion", "suppressed_expression_direct", "suppressed_expression_indirect", "tail_recursion", "too_many_arguments", ], ) def test_backtrace(filename): > compare_exception("backtrace", filename) filename = 'enqueue_with_others_handlers' tests/test_exceptions_formatting.py:147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dirname = 'backtrace', filename = 'enqueue_with_others_handlers' def compare_exception(dirname, filename): cwd = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) python = sys.executable or "python" filepath = os.path.join("tests", "exceptions", "source", dirname, filename + ".py") outpath = os.path.join(cwd, "tests", "exceptions", "output", dirname, filename + ".txt") with subprocess.Popen( [python, filepath], shell=False, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, env=dict(os.environ, PYTHONPATH=cwd, PYTHONIOENCODING="utf8"), ) as proc: stdout, stderr = proc.communicate() print(stderr, file=sys.stderr) > assert proc.returncode == 0 E AssertionError: assert 1 == 0 E + where 1 = .returncode cwd = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2' dirname = 'backtrace' filename = 'enqueue_with_others_handlers' filepath = 'tests/exceptions/source/backtrace/enqueue_with_others_handlers.py' outpath = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/output/backtrace/enqueue_with_others_handlers.txt' proc = python = '/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/.testenv/bin/python3' stderr = 'Traceback (most recent call last):\n File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/s...ocessing.SemLock(\n ^^^^^^^^^^^^^^^^^^^^^^^^^\nPermissionError: [Errno 13] Permission denied\n' stdout = '' tests/test_exceptions_formatting.py:105: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/tests/exceptions/source/backtrace/enqueue_with_others_handlers.py", line 18, in logger.add( File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/loguru/_logger.py", line 988, in add handler = Handler( ^^^^^^^^ File "/home/udu/aports/community/py3-loguru/src/loguru-0.7.2/loguru/_handler.py", line 93, in __init__ self._queue = multiprocessing.SimpleQueue() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/context.py", line 113, in SimpleQueue return SimpleQueue(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/queues.py", line 363, in __init__ self._rlock = ctx.Lock() ^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/multiprocessing/synchronize.py", line 169, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/usr/lib/python3.12/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( ^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied _______________________________ test_apply_spawn _______________________________ spawn_context = def test_apply_spawn(spawn_context): writer = Writer() > logger.add(writer, context=spawn_context, format="{message}", enqueue=True, catch=False) spawn_context = writer = tests/test_multiprocessing.py:100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _______________________________ test_apply_fork ________________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_apply_fork(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________________________ test_apply_inheritance ____________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_apply_inheritance(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________________________ test_apply_async_spawn ____________________________ spawn_context = def test_apply_async_spawn(spawn_context): writer = Writer() > logger.add(writer, context=spawn_context, format="{message}", enqueue=True, catch=False) spawn_context = writer = tests/test_multiprocessing.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ____________________________ test_apply_async_fork _____________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_apply_async_fork(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_apply_async_inheritance _________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_apply_async_inheritance(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________________ test_process_spawn ______________________________ spawn_context = def test_process_spawn(spawn_context): writer = Writer() > logger.add(writer, context=spawn_context, format="{message}", enqueue=True, catch=False) spawn_context = writer = tests/test_multiprocessing.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________________ test_process_fork _______________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_process_fork(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________________________ test_process_inheritance ___________________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_process_inheritance(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:245: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________ test_remove_in_child_process_spawn ______________________ spawn_context = def test_remove_in_child_process_spawn(spawn_context): writer = Writer() > logger.add(writer, context=spawn_context, format="{message}", enqueue=True, catch=False) spawn_context = writer = tests/test_multiprocessing.py:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________ test_remove_in_child_process_fork _______________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_remove_in_child_process_fork(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ___________________ test_remove_in_child_process_inheritance ___________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_remove_in_child_process_inheritance(fork_context): writer = Writer() > logger.add(writer, context=fork_context, format="{message}", enqueue=True, catch=False) fork_context = writer = tests/test_multiprocessing.py:298: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'ascii' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = stream = terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ______________________ test_remove_in_main_process_spawn _______________________ spawn_context = def test_remove_in_main_process_spawn(spawn_context): # Actually, this test may fail if sleep time in main process is too small (and no barrier used) # In such situation, it seems the child process has not enough time to initialize itself # It may fail with an "EOFError" during unpickling of the (garbage collected / closed) Queue writer = Writer() > barrier = spawn_context.Barrier(2) spawn_context = writer = tests/test_multiprocessing.py:317: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/multiprocessing/context.py:98: in Barrier return Barrier(parties, action, timeout, ctx=self.get_context()) Barrier = action = None parties = 2 self = timeout = None /usr/lib/python3.12/multiprocessing/synchronize.py:375: in __init__ wrapper = BufferWrapper(struct.calcsize('i') * 2) BufferWrapper = action = None ctx = parties = 2 self = <[AttributeError("'Barrier' object has no attribute '_array'") raised in repr()] Barrier object at 0x79128aebb3e0> struct = timeout = None /usr/lib/python3.12/multiprocessing/heap.py:331: in __init__ block = BufferWrapper._heap.malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:309: in malloc (arena, start, stop) = self._malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:192: in _malloc return self._new_arena(size) i = 0 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:166: in _new_arena arena = Arena(length) length = 4096 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:83: in __init__ self.fd, name = tempfile.mkstemp( fd = -1 self = size = 4096 /usr/lib/python3.12/tempfile.py:357: in mkstemp return _mkstemp_inner(dir, prefix, suffix, flags, output_type) dir = '/dev/shm' flags = 131266 output_type = prefix = 'pym-212490-' suffix = '' text = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dir = '/dev/shm', pre = 'pym-212490-', suf = '', flags = 131266 output_type = def _mkstemp_inner(dir, pre, suf, flags, output_type): """Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.""" dir = _os.path.abspath(dir) names = _get_candidate_names() if output_type is bytes: names = map(_os.fsencode, names) for seq in range(TMP_MAX): name = next(names) file = _os.path.join(dir, pre + name + suf) _sys.audit("tempfile.mkstemp", file) try: > fd = _os.open(file, flags, 0o600) E PermissionError: [Errno 13] Permission denied: '/dev/shm/pym-212490-nbg2_1de' dir = '/dev/shm' file = '/dev/shm/pym-212490-nbg2_1de' flags = 131266 name = 'nbg2_1de' names = output_type = pre = 'pym-212490-' seq = 0 suf = '' /usr/lib/python3.12/tempfile.py:256: PermissionError _______________________ test_remove_in_main_process_fork _______________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_remove_in_main_process_fork(fork_context): writer = Writer() > barrier = fork_context.Barrier(2) fork_context = writer = tests/test_multiprocessing.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/multiprocessing/context.py:98: in Barrier return Barrier(parties, action, timeout, ctx=self.get_context()) Barrier = action = None parties = 2 self = timeout = None /usr/lib/python3.12/multiprocessing/synchronize.py:375: in __init__ wrapper = BufferWrapper(struct.calcsize('i') * 2) BufferWrapper = action = None ctx = parties = 2 self = <[AttributeError("'Barrier' object has no attribute '_array'") raised in repr()] Barrier object at 0x79128ae43b30> struct = timeout = None /usr/lib/python3.12/multiprocessing/heap.py:331: in __init__ block = BufferWrapper._heap.malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:309: in malloc (arena, start, stop) = self._malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:192: in _malloc return self._new_arena(size) i = 0 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:166: in _new_arena arena = Arena(length) length = 8192 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:83: in __init__ self.fd, name = tempfile.mkstemp( fd = -1 self = size = 8192 /usr/lib/python3.12/tempfile.py:357: in mkstemp return _mkstemp_inner(dir, prefix, suffix, flags, output_type) dir = '/dev/shm' flags = 131266 output_type = prefix = 'pym-212490-' suffix = '' text = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dir = '/dev/shm', pre = 'pym-212490-', suf = '', flags = 131266 output_type = def _mkstemp_inner(dir, pre, suf, flags, output_type): """Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.""" dir = _os.path.abspath(dir) names = _get_candidate_names() if output_type is bytes: names = map(_os.fsencode, names) for seq in range(TMP_MAX): name = next(names) file = _os.path.join(dir, pre + name + suf) _sys.audit("tempfile.mkstemp", file) try: > fd = _os.open(file, flags, 0o600) E PermissionError: [Errno 13] Permission denied: '/dev/shm/pym-212490-8y28h6h2' dir = '/dev/shm' file = '/dev/shm/pym-212490-8y28h6h2' flags = 131266 name = '8y28h6h2' names = output_type = pre = 'pym-212490-' seq = 0 suf = '' /usr/lib/python3.12/tempfile.py:256: PermissionError ___________________ test_remove_in_main_process_inheritance ____________________ fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_remove_in_main_process_inheritance(fork_context): writer = Writer() > barrier = fork_context.Barrier(2) fork_context = writer = tests/test_multiprocessing.py:355: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/multiprocessing/context.py:98: in Barrier return Barrier(parties, action, timeout, ctx=self.get_context()) Barrier = action = None parties = 2 self = timeout = None /usr/lib/python3.12/multiprocessing/synchronize.py:375: in __init__ wrapper = BufferWrapper(struct.calcsize('i') * 2) BufferWrapper = action = None ctx = parties = 2 self = <[AttributeError("'Barrier' object has no attribute '_array'") raised in repr()] Barrier object at 0x79128ae40650> struct = timeout = None /usr/lib/python3.12/multiprocessing/heap.py:331: in __init__ block = BufferWrapper._heap.malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:309: in malloc (arena, start, stop) = self._malloc(size) self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:192: in _malloc return self._new_arena(size) i = 0 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:166: in _new_arena arena = Arena(length) length = 16384 self = size = 8 /usr/lib/python3.12/multiprocessing/heap.py:83: in __init__ self.fd, name = tempfile.mkstemp( fd = -1 self = size = 16384 /usr/lib/python3.12/tempfile.py:357: in mkstemp return _mkstemp_inner(dir, prefix, suffix, flags, output_type) dir = '/dev/shm' flags = 131266 output_type = prefix = 'pym-212490-' suffix = '' text = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dir = '/dev/shm', pre = 'pym-212490-', suf = '', flags = 131266 output_type = def _mkstemp_inner(dir, pre, suf, flags, output_type): """Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.""" dir = _os.path.abspath(dir) names = _get_candidate_names() if output_type is bytes: names = map(_os.fsencode, names) for seq in range(TMP_MAX): name = next(names) file = _os.path.join(dir, pre + name + suf) _sys.audit("tempfile.mkstemp", file) try: > fd = _os.open(file, flags, 0o600) E PermissionError: [Errno 13] Permission denied: '/dev/shm/pym-212490-i6bc_nhv' dir = '/dev/shm' file = '/dev/shm/pym-212490-i6bc_nhv' flags = 131266 name = 'i6bc_nhv' names = output_type = pre = 'pym-212490-' seq = 0 suf = '' /usr/lib/python3.12/tempfile.py:256: PermissionError __________________________ test_await_complete_spawn ___________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae40530> spawn_context = def test_await_complete_spawn(capsys, spawn_context): async def writer(msg): print(msg, end="") loop = asyncio.new_event_loop() > logger.add( writer, context=spawn_context, format="{message}", loop=loop, enqueue=True, catch=False ) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae40530> loop = <_UnixSelectorEventLoop running=False closed=False debug=False> spawn_context = writer = .writer at 0x79128a18b880> tests/test_multiprocessing.py:377: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = coro = .writer at 0x79128a18b880> diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'writer' self = serialize = False sink = .writer at 0x79128a18b880> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'writer' self = (id=0, level=10, sink=writer) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ------------------------------ Captured log call ------------------------------- DEBUG asyncio:selector_events.py:64 Using selector: EpollSelector ___________________________ test_await_complete_fork ___________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4f320> fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_await_complete_fork(capsys, fork_context): async def writer(msg): print(msg, end="") loop = asyncio.new_event_loop() > logger.add( writer, context=fork_context, format="{message}", loop=loop, enqueue=True, catch=False ) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4f320> fork_context = loop = <_UnixSelectorEventLoop running=False closed=False debug=False> writer = .writer at 0x79128a234f40> tests/test_multiprocessing.py:404: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = coro = .writer at 0x79128a234f40> diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'writer' self = serialize = False sink = .writer at 0x79128a234f40> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'writer' self = (id=0, level=10, sink=writer) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ------------------------------ Captured log call ------------------------------- DEBUG asyncio:selector_events.py:64 Using selector: EpollSelector _______________________ test_await_complete_inheritance ________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae7f830> fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_await_complete_inheritance(capsys, fork_context): async def writer(msg): print(msg, end="") loop = asyncio.new_event_loop() > logger.add( writer, context=fork_context, format="{message}", loop=loop, enqueue=True, catch=False ) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae7f830> fork_context = loop = <_UnixSelectorEventLoop running=False closed=False debug=False> writer = .writer at 0x79128a235800> tests/test_multiprocessing.py:431: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = coro = .writer at 0x79128a235800> diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 loop = <_UnixSelectorEventLoop running=False closed=False debug=False> name = 'writer' self = serialize = False sink = .writer at 0x79128a235800> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'writer' self = (id=0, level=10, sink=writer) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ------------------------------ Captured log call ------------------------------- DEBUG asyncio:selector_events.py:64 Using selector: EpollSelector ________________________ test_not_picklable_sinks_spawn ________________________ spawn_context = tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0') capsys = <_pytest.capture.CaptureFixture object at 0x79128a1ac3b0> def test_not_picklable_sinks_spawn(spawn_context, tmp_path, capsys): filepath = tmp_path / "test.log" stream = sys.stderr output = [] > logger.add(filepath, context=spawn_context, format="{message}", enqueue=True, catch=False) capsys = <_pytest.capture.CaptureFixture object at 0x79128a1ac3b0> filepath = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log') output = [] spawn_context = stream = <_io.TextIOWrapper encoding='UTF-8'> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0') tests/test_multiprocessing.py:456: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log'" path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log') self = serialize = False sink = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log') terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log'" self = (id=0, level=10, sink='/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_spawn0/test.log') serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = False value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ________________________ test_not_picklable_sinks_fork _________________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4e3f0> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0') fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_not_picklable_sinks_fork(capsys, tmp_path, fork_context): filepath = tmp_path / "test.log" stream = sys.stderr output = [] > logger.add(filepath, context=fork_context, format="{message}", enqueue=True, catch=False) capsys = <_pytest.capture.CaptureFixture object at 0x79128ae4e3f0> filepath = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log') fork_context = output = [] stream = <_io.TextIOWrapper encoding='UTF-8'> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0') tests/test_multiprocessing.py:483: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log'" path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log') self = serialize = False sink = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log') terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log'" self = (id=0, level=10, sink='/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_fork0/test.log') serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________ test_not_picklable_sinks_inheritance _____________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128aced6a0> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0') fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") def test_not_picklable_sinks_inheritance(capsys, tmp_path, fork_context): filepath = tmp_path / "test.log" stream = sys.stderr output = [] > logger.add(filepath, context=fork_context, format="{message}", enqueue=True, catch=False) capsys = <_pytest.capture.CaptureFixture object at 0x79128aced6a0> filepath = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log') fork_context = output = [] stream = <_io.TextIOWrapper encoding='UTF-8'> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0') tests/test_multiprocessing.py:516: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log'" path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log') self = serialize = False sink = PosixPath('/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log') terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = "'/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log'" self = (id=0, level=10, sink='/tmp/pytest-of-udu/pytest-0/test_not_picklable_sinks_inher0/test.log') serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________ test_no_deadlock_if_internal_lock_in_use[True-True] ______________ tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l0') enqueue = True, deepcopied = True fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.skipif(sys.version_info < (3, 7), reason="No 'os.register_at_fork()' function") @pytest.mark.parametrize("enqueue", [True, False]) @pytest.mark.parametrize("deepcopied", [True, False]) def test_no_deadlock_if_internal_lock_in_use(tmp_path, enqueue, deepcopied, fork_context): if deepcopied: logger_ = copy.deepcopy(logger) else: logger_ = logger output = tmp_path / "stdout.txt" stdout = output.open("w") def slow_sink(msg): time.sleep(0.5) stdout.write(msg) stdout.flush() def main(): logger_.info("Main") def worker(): logger_.info("Child") > logger_.add(slow_sink, context=fork_context, format="{message}", enqueue=enqueue, catch=False) deepcopied = True enqueue = True fork_context = logger_ = main = .main at 0x79128a235e40> output = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l0/stdout.txt') slow_sink = .slow_sink at 0x79128a2362a0> stdout = <_io.TextIOWrapper name='/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l0/stdout.txt' mode='w' encoding='UTF-8'> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l0') worker = .worker at 0x79128a236480> tests/test_multiprocessing.py:567: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'slow_sink' self = serialize = False sink = .slow_sink at 0x79128a2362a0> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'slow_sink' self = (id=0, level=10, sink=slow_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________ test_no_deadlock_if_internal_lock_in_use[False-True] _____________ tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l2') enqueue = True, deepcopied = False fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.skipif(sys.version_info < (3, 7), reason="No 'os.register_at_fork()' function") @pytest.mark.parametrize("enqueue", [True, False]) @pytest.mark.parametrize("deepcopied", [True, False]) def test_no_deadlock_if_internal_lock_in_use(tmp_path, enqueue, deepcopied, fork_context): if deepcopied: logger_ = copy.deepcopy(logger) else: logger_ = logger output = tmp_path / "stdout.txt" stdout = output.open("w") def slow_sink(msg): time.sleep(0.5) stdout.write(msg) stdout.flush() def main(): logger_.info("Main") def worker(): logger_.info("Child") > logger_.add(slow_sink, context=fork_context, format="{message}", enqueue=enqueue, catch=False) deepcopied = False enqueue = True fork_context = logger_ = main = .main at 0x79128a2367a0> output = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l2/stdout.txt') slow_sink = .slow_sink at 0x79128a236520> stdout = <_io.TextIOWrapper name='/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l2/stdout.txt' mode='w' encoding='UTF-8'> tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_no_deadlock_if_internal_l2') worker = .worker at 0x79128a236840> tests/test_multiprocessing.py:567: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'slow_sink' self = serialize = False sink = .slow_sink at 0x79128a236520> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = 'slow_sink' self = (id=0, level=10, sink=slow_sink) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError ________________ test_no_deadlock_if_external_lock_in_use[True] ________________ enqueue = True capsys = <_pytest.capture.CaptureFixture object at 0x79128aeb91c0> fork_context = @pytest.mark.skipif(sys.version_info < (3, 7), reason="No 'os.register_at_fork()' function") @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.parametrize("enqueue", [True, False]) def test_no_deadlock_if_external_lock_in_use(enqueue, capsys, fork_context): # Can't reproduce the bug on pytest (even if stderr is not wrapped), but let it anyway > logger.add(sys.stderr, context=fork_context, enqueue=enqueue, catch=True, format="{message}") capsys = <_pytest.capture.CaptureFixture object at 0x79128aeb91c0> enqueue = True fork_context = tests/test_multiprocessing.py:590: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = diagnose = True encoding = 'UTF-8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = "<_io.TextIOWrapper encoding='UTF-8'>" self = serialize = False sink = <_io.TextIOWrapper encoding='UTF-8'> stream = <_io.TextIOWrapper encoding='UTF-8'> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = "<_io.TextIOWrapper encoding='UTF-8'>" self = (id=0, level=10, sink=<_io.TextIOWrapper encoding='UTF-8'>) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________ test_complete_from_multiple_child_processes __________________ capsys = <_pytest.capture.CaptureFixture object at 0x79128aebbcb0> fork_context = @pytest.mark.skipif(os.name == "nt", reason="Windows does not support forking") @pytest.mark.skipif(platform.python_implementation() == "PyPy", reason="PyPy is too slow") def test_complete_from_multiple_child_processes(capsys, fork_context): > logger.add(lambda _: None, context=fork_context, enqueue=True, catch=False) capsys = <_pytest.capture.CaptureFixture object at 0x79128aebbcb0> fork_context = tests/test_multiprocessing.py:610: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = False colorize = False context = diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = '' self = serialize = False sink = . at 0x79128a120a40> terminator = '\n' wrapped_sink = loguru/_handler.py:97: in __init__ self._queue = self._multiprocessing_context.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = name = '' self = (id=0, level=10, sink=) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _____________________________ test_remove_enqueue ______________________________ writer = .w at 0x79128a2ffe20> def test_remove_enqueue(writer): > i = logger.add(writer, format="{message}", enqueue=True) writer = .w at 0x79128a2ffe20> tests/test_remove.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = 'w' self = serialize = False sink = .w at 0x79128a2ffe20> terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = 'w' self = (id=0, level=10, sink=w) serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError _________________________ test_remove_enqueue_filesink _________________________ tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0') def test_remove_enqueue_filesink(tmp_path): file = tmp_path / "test.log" > i = logger.add(file, format="{message}", enqueue=True) file = PosixPath('/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log') tmp_path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0') tests/test_remove.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ loguru/_logger.py:988: in add handler = Handler( backtrace = True catch = True colorize = False context = None diagnose = True encoding = 'utf8' enqueue = True error_interceptor = exception_formatter = exception_prefix = '' filter = None filter_func = None format = '{message}' formatter = handler_id = 0 is_formatter_dynamic = False kwargs = {} level = 'DEBUG' levelno = 10 name = "'/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log'" path = PosixPath('/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log') self = serialize = False sink = PosixPath('/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log') terminator = '\n' wrapped_sink = loguru/_handler.py:93: in __init__ self._queue = multiprocessing.SimpleQueue() colorize = False enqueue = True error_interceptor = exception_formatter = filter_ = None formatter = id_ = 0 is_formatter_dynamic = False levelno = 10 levels_ansi_codes = {'TRACE': '\x1b[36m\x1b[1m', 'DEBUG': '\x1b[34m\x1b[1m', 'INFO': '\x1b[1m', 'SUCCESS': '\x1b[32m\x1b[1m', ...} multiprocessing_context = None name = "'/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log'" self = (id=0, level=10, sink='/tmp/pytest-of-udu/pytest-0/test_remove_enqueue_filesink0/test.log') serialize = False sink = /usr/lib/python3.12/multiprocessing/context.py:113: in SimpleQueue return SimpleQueue(ctx=self.get_context()) SimpleQueue = self = /usr/lib/python3.12/multiprocessing/queues.py:363: in __init__ self._rlock = ctx.Lock() ctx = self = /usr/lib/python3.12/multiprocessing/context.py:68: in Lock return Lock(ctx=self.get_context()) Lock = self = /usr/lib/python3.12/multiprocessing/synchronize.py:169: in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) ctx = self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , kind = 1, value = 1, maxvalue = 1 def __init__(self, kind, value, maxvalue, *, ctx): if ctx is None: ctx = context._default_context.get_context() self._is_fork_ctx = ctx.get_start_method() == 'fork' unlink_now = sys.platform == 'win32' or self._is_fork_ctx for i in range(100): try: > sl = self._semlock = _multiprocessing.SemLock( kind, value, maxvalue, self._make_name(), unlink_now) E PermissionError: [Errno 13] Permission denied ctx = i = 0 kind = 1 maxvalue = 1 self = unlink_now = True value = 1 /usr/lib/python3.12/multiprocessing/synchronize.py:57: PermissionError =========================== short test summary info ============================ FAILED tests/test_add_option_catch.py::test_broken_sink_message[True] - Permi... FAILED tests/test_add_option_catch.py::test_broken_sink_caught_keep_working[True] FAILED tests/test_add_option_catch.py::test_broken_sink_not_caught_enqueue - ... FAILED tests/test_add_option_context.py::test_using_multiprocessing_directly_if_context_is_none FAILED tests/test_add_option_context.py::test_fork_context_as_string[fork] - ... FAILED tests/test_add_option_context.py::test_fork_context_as_string[forkserver] FAILED tests/test_add_option_context.py::test_spawn_context_as_string - Permi... FAILED tests/test_add_option_context.py::test_fork_context_as_object[fork] - ... FAILED tests/test_add_option_context.py::test_fork_context_as_object[forkserver] FAILED tests/test_add_option_context.py::test_spawn_context_as_object - Permi... FAILED tests/test_add_option_enqueue.py::test_enqueue - PermissionError: [Err... FAILED tests/test_add_option_enqueue.py::test_enqueue_with_exception - Permis... FAILED tests/test_add_option_enqueue.py::test_caught_exception_queue_put - Pe... FAILED tests/test_add_option_enqueue.py::test_caught_exception_queue_get - Pe... FAILED tests/test_add_option_enqueue.py::test_caught_exception_sink_write - P... FAILED tests/test_add_option_enqueue.py::test_not_caught_exception_queue_put FAILED tests/test_add_option_enqueue.py::test_not_caught_exception_queue_get FAILED tests/test_add_option_enqueue.py::test_not_caught_exception_sink_write FAILED tests/test_add_option_enqueue.py::test_not_caught_exception_sink_write_then_complete FAILED tests/test_add_option_enqueue.py::test_not_caught_exception_queue_get_then_complete FAILED tests/test_add_option_enqueue.py::test_wait_for_all_messages_enqueued FAILED tests/test_add_option_enqueue.py::test_logging_not_picklable_exception[exception_value0] FAILED tests/test_add_option_enqueue.py::test_logging_not_picklable_exception[exception_value1] FAILED tests/test_add_option_enqueue.py::test_logging_not_unpicklable_exception[exception_value0] FAILED tests/test_add_option_enqueue.py::test_logging_not_unpicklable_exception[exception_value1] FAILED tests/test_coroutine_sink.py::test_enqueue_coroutine_loop - Permission... FAILED tests/test_coroutine_sink.py::test_enqueue_coroutine_from_inside_coroutine_without_loop FAILED tests/test_coroutine_sink.py::test_complete_with_sub_processes - Permi... FAILED tests/test_exceptions_formatting.py::test_backtrace[enqueue] - Asserti... FAILED tests/test_exceptions_formatting.py::test_backtrace[enqueue_with_others_handlers] FAILED tests/test_multiprocessing.py::test_apply_spawn - PermissionError: [Er... FAILED tests/test_multiprocessing.py::test_apply_fork - PermissionError: [Err... FAILED tests/test_multiprocessing.py::test_apply_inheritance - PermissionErro... FAILED tests/test_multiprocessing.py::test_apply_async_spawn - PermissionErro... FAILED tests/test_multiprocessing.py::test_apply_async_fork - PermissionError... FAILED tests/test_multiprocessing.py::test_apply_async_inheritance - Permissi... FAILED tests/test_multiprocessing.py::test_process_spawn - PermissionError: [... FAILED tests/test_multiprocessing.py::test_process_fork - PermissionError: [E... FAILED tests/test_multiprocessing.py::test_process_inheritance - PermissionEr... FAILED tests/test_multiprocessing.py::test_remove_in_child_process_spawn - Pe... FAILED tests/test_multiprocessing.py::test_remove_in_child_process_fork - Per... FAILED tests/test_multiprocessing.py::test_remove_in_child_process_inheritance FAILED tests/test_multiprocessing.py::test_remove_in_main_process_spawn - Per... FAILED tests/test_multiprocessing.py::test_remove_in_main_process_fork - Perm... FAILED tests/test_multiprocessing.py::test_remove_in_main_process_inheritance FAILED tests/test_multiprocessing.py::test_await_complete_spawn - PermissionE... FAILED tests/test_multiprocessing.py::test_await_complete_fork - PermissionEr... FAILED tests/test_multiprocessing.py::test_await_complete_inheritance - Permi... FAILED tests/test_multiprocessing.py::test_not_picklable_sinks_spawn - Permis... FAILED tests/test_multiprocessing.py::test_not_picklable_sinks_fork - Permiss... FAILED tests/test_multiprocessing.py::test_not_picklable_sinks_inheritance - ... FAILED tests/test_multiprocessing.py::test_no_deadlock_if_internal_lock_in_use[True-True] FAILED tests/test_multiprocessing.py::test_no_deadlock_if_internal_lock_in_use[False-True] FAILED tests/test_multiprocessing.py::test_no_deadlock_if_external_lock_in_use[True] FAILED tests/test_multiprocessing.py::test_complete_from_multiple_child_processes FAILED tests/test_remove.py::test_remove_enqueue - PermissionError: [Errno 13... FAILED tests/test_remove.py::test_remove_enqueue_filesink - PermissionError: ... ============ 57 failed, 1412 passed, 28 skipped in 87.91s (0:01:27) ============ >>> ERROR: py3-loguru: check failed >>> py3-loguru: Uninstalling dependencies... (1/35) Purging .makedepends-py3-loguru (20251012.200344) (2/35) Purging py3-colorama-pyc (0.4.6-r5) (3/35) Purging py3-colorama (0.4.6-r5) (4/35) Purging py3-gpep517-pyc (19-r0) (5/35) Purging py3-gpep517 (19-r0) (6/35) Purging py3-installer-pyc (0.7.0-r2) (7/35) Purging py3-installer (0.7.0-r2) (8/35) Purging py3-setuptools-pyc (80.9.0-r0) (9/35) Purging py3-setuptools (80.9.0-r0) (10/35) Purging py3-wheel-pyc (0.46.1-r0) (11/35) Purging py3-wheel (0.46.1-r0) (12/35) Purging py3-pytest-pyc (8.3.5-r0) (13/35) Purging py3-pytest (8.3.5-r0) (14/35) Purging py3-iniconfig-pyc (2.1.0-r0) (15/35) Purging py3-iniconfig (2.1.0-r0) (16/35) Purging py3-packaging-pyc (25.0-r0) (17/35) Purging py3-packaging (25.0-r0) (18/35) Purging py3-parsing-pyc (3.2.3-r0) (19/35) Purging py3-parsing (3.2.3-r0) (20/35) Purging py3-pluggy-pyc (1.5.0-r0) (21/35) Purging py3-pluggy (1.5.0-r0) (22/35) Purging py3-py-pyc (1.11.0-r4) (23/35) Purging py3-py (1.11.0-r4) (24/35) Purging py3-freezegun-pyc (1.5.1-r0) (25/35) Purging py3-freezegun (1.5.1-r0) (26/35) Purging py3-dateutil-pyc (2.9.0-r1) (27/35) Purging py3-dateutil (2.9.0-r1) (28/35) Purging py3-six-pyc (1.17.0-r0) (29/35) Purging py3-six (1.17.0-r0) (30/35) Purging py3-mypy-pyc (1.15.0-r0) (31/35) Purging py3-mypy (1.15.0-r0) (32/35) Purging py3-mypy-extensions-pyc (1.0.0-r3) (33/35) Purging py3-mypy-extensions (1.0.0-r3) (34/35) Purging py3-typing-extensions-pyc (4.13.2-r0) (35/35) Purging py3-typing-extensions (4.13.2-r0) Executing busybox-1.37.0-r19.trigger OK: 296 MiB in 89 packages