-
Notifications
You must be signed in to change notification settings - Fork 95
Testsuite failure when using Python3.14 or later #88
Copy link
Copy link
Open
Description
The current timeout-decorator source code ( 9fbc3ef ) is not compatible with Python 3.14+, as indicated in the testsuite failures. This is due to the behavior change on UNIX-like platforms where forkserver method in multiprocessing is used by default instead of fork, as mentioned in https://docs.python.org/3/whatsnew/3.14.html#changes-in-the-python-api .
The testsuite passes with Python 3.13:
-> % python3.13 -m pytest tests
======================================================================================== test session starts =========================================================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 -- /usr/bin/python3.13
cachedir: .pytest_cache
rootdir: /dev/shm/gh/timeout-decorator
configfile: tox.ini
plugins: anyio-4.11.0, typeguard-4.4.4
collected 22 items
tests/test_timeout_decorator.py::test_timeout_decorator_arg[False] PASSED [ 4%]
tests/test_timeout_decorator.py::test_timeout_decorator_arg[True] PASSED [ 9%]
tests/test_timeout_decorator.py::test_timeout_class_method[False] PASSED [ 13%]
tests/test_timeout_decorator.py::test_timeout_class_method[True] PASSED [ 18%]
tests/test_timeout_decorator.py::test_timeout_kwargs[False] PASSED [ 22%]
tests/test_timeout_decorator.py::test_timeout_kwargs[True] PASSED [ 27%]
tests/test_timeout_decorator.py::test_timeout_alternate_exception[False] PASSED [ 31%]
tests/test_timeout_decorator.py::test_timeout_alternate_exception[True] PASSED [ 36%]
tests/test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[False] PASSED [ 40%]
tests/test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[True] PASSED [ 45%]
tests/test_timeout_decorator.py::test_timeout_no_seconds[False] PASSED [ 50%]
tests/test_timeout_decorator.py::test_timeout_no_seconds[True] PASSED [ 54%]
tests/test_timeout_decorator.py::test_timeout_partial_seconds[False] PASSED [ 59%]
tests/test_timeout_decorator.py::test_timeout_partial_seconds[True] PASSED [ 63%]
tests/test_timeout_decorator.py::test_timeout_ok[False] PASSED [ 68%]
tests/test_timeout_decorator.py::test_timeout_ok[True] PASSED [ 72%]
tests/test_timeout_decorator.py::test_function_name[False] PASSED [ 77%]
tests/test_timeout_decorator.py::test_function_name[True] PASSED [ 81%]
tests/test_timeout_decorator.py::test_timeout_pickle_error PASSED [ 86%]
tests/test_timeout_decorator.py::test_timeout_custom_exception_message PASSED [ 90%]
tests/test_timeout_decorator.py::test_timeout_custom_exception_with_message PASSED [ 95%]
tests/test_timeout_decorator.py::test_timeout_default_exception_message PASSED [100%]
========================================================================================== warnings summary ==========================================================================================
../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1428
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1428: PytestConfigWarning: Unknown config option: pep8maxlinelength
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================================== 22 passed, 1 warning in 16.74s ===================================================================================
However, the testsuite fails with Python 3.14:
-> % python3.14 -m pytest tests
========================================== test session starts ==========================================
platform linux -- Python 3.14.2, pytest-9.0.2, pluggy-1.6.0 -- /usr/bin/python3.14
cachedir: .pytest_cache
rootdir: /dev/shm/gh/timeout-decorator
configfile: tox.ini
plugins: anyio-4.11.0, typeguard-4.4.4
collected 22 items
tests/test_timeout_decorator.py::test_timeout_decorator_arg[False] FAILED [ 4%]
tests/test_timeout_decorator.py::test_timeout_decorator_arg[True] PASSED [ 9%]
tests/test_timeout_decorator.py::test_timeout_class_method[False] FAILED [ 13%]
tests/test_timeout_decorator.py::test_timeout_class_method[True] PASSED [ 18%]
tests/test_timeout_decorator.py::test_timeout_kwargs[False] FAILED [ 22%]
tests/test_timeout_decorator.py::test_timeout_kwargs[True] PASSED [ 27%]
tests/test_timeout_decorator.py::test_timeout_alternate_exception[False] FAILED [ 31%]
tests/test_timeout_decorator.py::test_timeout_alternate_exception[True] PASSED [ 36%]
tests/test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[False] FAILED [ 40%]
tests/test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[True] PASSED [ 45%]
tests/test_timeout_decorator.py::test_timeout_no_seconds[False] FAILED [ 50%]
tests/test_timeout_decorator.py::test_timeout_no_seconds[True] PASSED [ 54%]
tests/test_timeout_decorator.py::test_timeout_partial_seconds[False] FAILED [ 59%]
tests/test_timeout_decorator.py::test_timeout_partial_seconds[True] PASSED [ 63%]
tests/test_timeout_decorator.py::test_timeout_ok[False] FAILED [ 68%]
tests/test_timeout_decorator.py::test_timeout_ok[True] PASSED [ 72%]
tests/test_timeout_decorator.py::test_function_name[False] PASSED [ 77%]
tests/test_timeout_decorator.py::test_function_name[True] PASSED [ 81%]
tests/test_timeout_decorator.py::test_timeout_pickle_error FAILED [ 86%]
tests/test_timeout_decorator.py::test_timeout_custom_exception_message PASSED [ 90%]
tests/test_timeout_decorator.py::test_timeout_custom_exception_with_message PASSED [ 95%]
tests/test_timeout_decorator.py::test_timeout_default_exception_message PASSED [100%]
=============================================== FAILURES ================================================
___________________________________ test_timeout_decorator_arg[False] ___________________________________
use_signals = False
def test_timeout_decorator_arg(use_signals):
@timeout(1, use_signals=use_signals)
def f():
time.sleep(2)
with pytest.raises(TimeoutError):
> f()
f = <function test_timeout_decorator_arg.<locals>.f at 0x7add66f66da0>
use_signals = False
tests/test_timeout_decorator.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_decorator_arg.<locals>.f at 0x7add66f66c40>
kwargs = {}
seconds = 1
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add67022e40>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66fd0190>,
<function test_timeout_decorator_arg.<locals>.f at 0x7add66f66c40>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add67022e40>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-2' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-2' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-2' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-2' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add67022f90>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-2' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add67022f90>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fbcbd0>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-2',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-2' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add67022f90>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-2' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fbcbd0>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_decorator_arg.<locals>.f at 0x7add66f66c40>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fbcbd0>
obj = <Process name='Process-2' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
___________________________________ test_timeout_class_method[False] ____________________________________
use_signals = False
def test_timeout_class_method(use_signals):
class c():
@timeout(1, use_signals=use_signals)
def f(self):
time.sleep(2)
with pytest.raises(TimeoutError):
> c().f()
c = <class 'tests.test_timeout_decorator.test_timeout_class_method.<locals>.c'>
use_signals = False
tests/test_timeout_decorator.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = (<tests.test_timeout_decorator.test_timeout_class_method.<locals>.c object at 0x7add67022900>,)
exception_message = None
function = <function test_timeout_class_method.<locals>.c.f at 0x7add67fabb60>
kwargs = {}
seconds = 1
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66fd1090>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66f19810>,
<function test_timeout_class_method.<locals>.c.f at 0x7add67fabb60>,
<tests.test_timeout_decorator.test_timeout_class_method.<locals>.c object at 0x7add67022900>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66fd1090>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-4' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-4' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-4' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-4' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd11d0>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-4' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd11d0>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fe6f70>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-4',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-4' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd11d0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-4' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fe6f70>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_class_method.<locals>.c.f at 0x7add67fabb60>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fe6f70>
obj = <Process name='Process-4' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
______________________________________ test_timeout_kwargs[False] _______________________________________
use_signals = False
def test_timeout_kwargs(use_signals):
@timeout(3, use_signals=use_signals)
def f():
time.sleep(2)
with pytest.raises(TimeoutError):
> f(timeout=1)
f = <function test_timeout_kwargs.<locals>.f at 0x7add67ff8e00>
use_signals = False
tests/test_timeout_decorator.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_kwargs.<locals>.f at 0x7add67ff8b40>
kwargs = {'timeout': 1}
seconds = 3
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add67051f90>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66fdc5f0>,
<function test_timeout_kwargs.<locals>.f at 0x7add67ff8b40>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add67051f90>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-6' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-6' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-6' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-6' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd1310>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-6' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd1310>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66e3af70>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-6',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-6' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fd1310>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-6' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66e3af70>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_kwargs.<locals>.f at 0x7add67ff8b40>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66e3af70>
obj = <Process name='Process-6' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
________________________________ test_timeout_alternate_exception[False] ________________________________
use_signals = False
def test_timeout_alternate_exception(use_signals):
@timeout(3, use_signals=use_signals, timeout_exception=StopIteration)
def f():
time.sleep(2)
with pytest.raises(StopIteration):
> f(timeout=1)
f = <function test_timeout_alternate_exception.<locals>.f at 0x7add66f66ae0>
use_signals = False
tests/test_timeout_decorator.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_alternate_exception.<locals>.f at 0x7add66f668d0>
kwargs = {'timeout': 1}
seconds = 3
timeout_exception = <class 'StopIteration'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f19ba0>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66f12580>,
<function test_timeout_alternate_exception.<locals>.f at 0x7add66f668d0>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f19ba0>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-8' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-8' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-8' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-8' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f19f30>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-8' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f19f30>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fedad0>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-8',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-8' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f19f30>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-8' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fedad0>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_alternate_exception.<locals>.f at 0x7add66f668d0>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fedad0>
obj = <Process name='Process-8' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
_________________________ test_timeout_kwargs_with_initial_timeout_none[False] __________________________
use_signals = False
def test_timeout_kwargs_with_initial_timeout_none(use_signals):
@timeout(use_signals=use_signals)
def f():
time.sleep(2)
with pytest.raises(TimeoutError):
> f(timeout=1)
f = <function test_timeout_kwargs_with_initial_timeout_none.<locals>.f at 0x7add66f66090>
use_signals = False
tests/test_timeout_decorator.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_kwargs_with_initial_timeout_none.<locals>.f at 0x7add66f66140>
kwargs = {'timeout': 1}
seconds = None
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f1a190>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66f0f450>,
<function test_timeout_kwargs_with_initial_timeout_none.<locals>.f at 0x7add66f66140>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f1a190>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-10' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-10' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-10' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-10' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f1a520>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-10' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f1a520>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fee660>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-10',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-10' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f1a520>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-10' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fee660>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_kwargs_with_initial_timeout_none.<locals>.f at 0x7add66f66140>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fee660>
obj = <Process name='Process-10' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
____________________________________ test_timeout_no_seconds[False] _____________________________________
use_signals = False
def test_timeout_no_seconds(use_signals):
@timeout(use_signals=use_signals)
def f():
time.sleep(0.1)
> f()
f = <function test_timeout_no_seconds.<locals>.f at 0x7add66fc7a00>
use_signals = False
tests/test_timeout_decorator.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_no_seconds.<locals>.f at 0x7add66fc7950>
kwargs = {}
seconds = None
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66fdd370>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66ff6120>,
<function test_timeout_no_seconds.<locals>.f at 0x7add66fc7950>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66fdd370>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-12' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-12' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-12' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-12' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fdd490>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-12' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fdd490>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fed2b0>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-12',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-12' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66fdd490>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-12' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fed2b0>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_no_seconds.<locals>.f at 0x7add66fc7950>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fed2b0>
obj = <Process name='Process-12' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
__________________________________ test_timeout_partial_seconds[False] __________________________________
use_signals = False
def test_timeout_partial_seconds(use_signals):
@timeout(0.2, use_signals=use_signals)
def f():
time.sleep(0.5)
with pytest.raises(TimeoutError):
> f()
f = <function test_timeout_partial_seconds.<locals>.f at 0x7add66e5c510>
use_signals = False
tests/test_timeout_decorator.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_partial_seconds.<locals>.f at 0x7add66e5c460>
kwargs = {}
seconds = 0.2
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f12ad0>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66ff7110>,
<function test_timeout_partial_seconds.<locals>.f at 0x7add66e5c460>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f12ad0>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-14' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-14' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-14' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-14' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f12be0>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-14' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f12be0>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66fedda0>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-14',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-14' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f12be0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-14' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66fedda0>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_partial_seconds.<locals>.f at 0x7add66e5c460>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66fedda0>
obj = <Process name='Process-14' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
________________________________________ test_timeout_ok[False] _________________________________________
use_signals = False
def test_timeout_ok(use_signals):
@timeout(seconds=2, use_signals=use_signals)
def f():
time.sleep(1)
> f()
f = <function test_timeout_ok.<locals>.f at 0x7add66e5d2d0>
use_signals = False
tests/test_timeout_decorator.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_ok.<locals>.f at 0x7add66e5d170>
kwargs = {}
seconds = 2
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f13130>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66edc050>,
<function test_timeout_ok.<locals>.f at 0x7add66e5d170>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66f13130>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-16' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-16' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-16' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-16' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f13240>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-16' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f13240>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66e9a480>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-16',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-16' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66f13240>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-16' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66e9a480>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_ok.<locals>.f at 0x7add66e5d170>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66e9a480>
obj = <Process name='Process-16' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
_______________________________________ test_timeout_pickle_error _______________________________________
def test_timeout_pickle_error():
"""Test that when a pickle error occurs a timeout error is raised."""
@timeout(seconds=1, use_signals=False)
def f():
time.sleep(0.1)
class Test(object):
pass
return Test()
with pytest.raises(TimeoutError):
> f()
f = <function test_timeout_pickle_error.<locals>.f at 0x7add66e5e350>
tests/test_timeout_decorator.py:96:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout_decorator/timeout_decorator.py:92: in new_function
return timeout_wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
args = ()
exception_message = None
function = <function test_timeout_pickle_error.<locals>.f at 0x7add66e5e140>
kwargs = {}
seconds = 1
timeout_exception = <class 'timeout_decorator.timeout_decorator.TimeoutError'>
timeout_wrapper = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66eaca50>
timeout_decorator/timeout_decorator.py:147: in __call__
self.__process.start()
args = (<multiprocessing.queues.Queue object at 0x7add66edcf50>,
<function test_timeout_pickle_error.<locals>.f at 0x7add66e5e140>)
kwargs = {}
self = <timeout_decorator.timeout_decorator._Timeout object at 0x7add66eaca50>
/usr/lib/python3.14/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
self = <Process name='Process-18' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
process_obj = <Process name='Process-18' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/context.py:300: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
Popen = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-18' parent=23123 initial daemon>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
__class__ = <class 'multiprocessing.popen_forkserver.Popen'>
process_obj = <Process name='Process-18' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66eacd50>
/usr/lib/python3.14/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
process_obj = <Process name='Process-18' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66eacd50>
/usr/lib/python3.14/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
buf = <_io.BytesIO object at 0x7add66e99210>
prep_data = {'authkey': b'\x04\xbfQ6RD\xf3I\xcf\xac4\x8b\x10}\x93\xef\xad7\xbeX\xcc\xfe,a'
b'O\xc4\xa7o\xff\xdc~r',
'dir': '/dev/shm/gh/timeout-decorator',
'init_main_from_name': 'pytest.__main__',
'log_to_stderr': False,
'name': 'Process-18',
'orig_dir': '/dev/shm/gh/timeout-decorator',
'start_method': 'forkserver',
'sys_argv': ['/usr/lib/python3/dist-packages/pytest/__main__.py', 'tests'],
'sys_path': ['/dev/shm/gh/timeout-decorator',
'/usr/lib/python314.zip',
'/usr/lib/python3.14',
'/usr/lib/python3.14/lib-dynload',
'/usr/local/lib/python3.14/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.14/dist-packages']}
process_obj = <Process name='Process-18' parent=23123 initial daemon>
self = <multiprocessing.popen_forkserver.Popen object at 0x7add66eacd50>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = <Process name='Process-18' parent=23123 initial daemon>
file = <_io.BytesIO object at 0x7add66e99210>, protocol = None
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E _pickle.PicklingError: Can't pickle local object <function test_timeout_pickle_error.<locals>.f at 0x7add66e5e140>
E when serializing tuple item 1
E when serializing dict item '_args'
E when serializing multiprocessing.context.Process state
E when serializing multiprocessing.context.Process object
file = <_io.BytesIO object at 0x7add66e99210>
obj = <Process name='Process-18' parent=23123 initial daemon>
protocol = None
/usr/lib/python3.14/multiprocessing/reduction.py:60: PicklingError
=========================================== warnings summary ============================================
../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1428
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1428: PytestConfigWarning: Unknown config option: pep8maxlinelength
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================== short test summary info ========================================
FAILED tests/test_timeout_decorator.py::test_timeout_decorator_arg[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_decorator_arg.<locals>.f at 0x7add66f66c40>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_class_method[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_class_method.<locals>.c.f at 0x7add67fabb60>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_kwargs[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_kwargs.<locals>.f at 0x7add67ff8b40>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_alternate_exception[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_alternate_exception.<locals>.f at 0x7add66f668d0>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_kwargs_with_initial_timeout_none[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_kwargs_with_initial_timeout_none.<locals>.f at 0x7add66f66140>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_no_seconds[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_no_seconds.<locals>.f at 0x7add66fc7950>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_partial_seconds[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_partial_seconds.<locals>.f at 0x7add66e5c460>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_ok[False] - _pickle.PicklingError: Can't pickle local object <function test_timeout_ok.<locals>.f at 0x7add66e5d170>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
FAILED tests/test_timeout_decorator.py::test_timeout_pickle_error - _pickle.PicklingError: Can't pickle local object <function test_timeout_pickle_error.<locals>.f at 0x7add66e5e140>
when serializing tuple item 1
when serializing dict item '_args'
when serializing multiprocessing.context.Process state
when serializing multiprocessing.context.Process object
================================ 9 failed, 13 passed, 1 warning in 9.56s ================================
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels