Source: python-simpy3 Version: 3.0.11-3 Severity: normal User: [email protected] Usertags: python3.13
This package failed build from source when test-built against a version of python3-defaults that includes 3.13 as a supported version. To reproduce this issue, build against python3-defaults (python3-all-dev etc.) from Debian experimental. What's new in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html Log snippet: dh_auto_test -O--buildsystem=pybuild I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build; python3.13 -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0 rootdir: /<<PKGBUILDDIR>> configfile: setup.cfg plugins: typeguard-4.3.0 collected 150 items / 10 deselected / 140 selected tests/test_condition.py ..................... [ 15%] tests/test_environment.py ...... [ 19%] tests/test_event.py ......... [ 25%] tests/test_exceptions.py ...F...... [ 32%] tests/test_interrupts.py .......... [ 40%] tests/test_process.py .......... [ 47%] tests/test_resources.py ........................................ [ 75%] tests/test_rt.py ......... [ 82%] tests/test_timeout.py ..... [ 85%] tests/test_util.py .................... [100%] =================================== FAILURES =================================== ___________________________ test_exception_chaining ____________________________ env = <simpy.core.Environment object at 0xffffb68dbcf0> def child(env): yield env.timeout(1) > raise RuntimeError('foo') E RuntimeError: foo tests/test_exceptions.py:79: RuntimeError The above exception was the direct cause of the following exception: env = <simpy.core.Environment object at 0xffffb68dbcf0> def parent(env): child_proc = env.process(child(env)) > yield child_proc E RuntimeError: foo tests/test_exceptions.py:83: RuntimeError The above exception was the direct cause of the following exception: env = <simpy.core.Environment object at 0xffffb68dbcf0> def grandparent(env): parent_proc = env.process(parent(env)) > yield parent_proc E RuntimeError: foo tests/test_exceptions.py:87: RuntimeError The above exception was the direct cause of the following exception: env = <simpy.core.Environment object at 0xffffb68dbcf0> def test_exception_chaining(env): """Unhandled exceptions pass through the entire event stack. This must be visible in the stacktrace of the exception. """ def child(env): yield env.timeout(1) raise RuntimeError('foo') def parent(env): child_proc = env.process(child(env)) yield child_proc def grandparent(env): parent_proc = env.process(parent(env)) yield parent_proc env.process(grandparent(env)) try: > env.run() tests/test_exceptions.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ simpy/core.py:138: in run self.step() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <simpy.core.Environment object at 0xffffb68dbcf0> def step(self): """Process the next event. Raise an :exc:`EmptySchedule` if no further events are available. """ try: self._now, _, _, event = heappop(self._queue) except IndexError: raise EmptySchedule() # Process callbacks of the event. Set the events callbacks to None # immediately to prevent concurrent modifications. callbacks, event.callbacks = event.callbacks, None for callback in callbacks: callback(event) if not event._ok and not hasattr(event, '_defused'): # The event has failed and has not been defused. Crash the # environment. # Create a copy of the failure exception with a new traceback. exc = type(event._value)(*event._value.args) exc.__cause__ = event._value > raise exc E RuntimeError: foo simpy/core.py:230: RuntimeError During handling of the above exception, another exception occurred: env = <simpy.core.Environment object at 0xffffb68dbcf0> def test_exception_chaining(env): """Unhandled exceptions pass through the entire event stack. This must be visible in the stacktrace of the exception. """ def child(env): yield env.timeout(1) raise RuntimeError('foo') def parent(env): child_proc = env.process(child(env)) yield child_proc def grandparent(env): parent_proc = env.process(parent(env)) yield parent_proc env.process(grandparent(env)) try: env.run() pytest.fail('There should have been an exception') except RuntimeError: trace = traceback.format_exc() expected = re.escape(textwrap.dedent("""\ Traceback (most recent call last): File "{path}tests/test_exceptions.py", line {line}, in child raise RuntimeError('foo') RuntimeError: foo The above exception was the direct cause of the following exception: Traceback (most recent call last): File "{path}tests/test_exceptions.py", line {line}, in parent yield child_proc RuntimeError: foo The above exception was the direct cause of the following exception: Traceback (most recent call last): File "{path}tests/test_exceptions.py", line {line}, in grandparent yield parent_proc RuntimeError: foo The above exception was the direct cause of the following exception: Traceback (most recent call last): File "{path}tests/test_exceptions.py", line {line}, in test_exception_chaining env.run() File "{path}simpy/core.py", line {line}, in run self.step() File "{path}simpy/core.py", line {line}, in step raise exc RuntimeError: foo """)).replace(r'\{line\}', r'\d+').replace(r'\{path\}', r'.*') # NOQA if platform.system() == 'Windows': expected = expected.replace(r'\/', r'\\') > assert re.match(expected, trace), 'Traceback mismatch' E AssertionError: Traceback mismatch E assert None E + where None = <function match at 0xffffb80b6020>('Traceback\\ \\(most\\ recent\\ call\\ last\\):\\\n\\ \\ File\\ ".*tests/test_exceptions\\.py",\\ line\\ \\d+,\\ in\\ ...\\\n\\ \\ File\\ ".*simpy/core\\.py",\\ line\\ \\d+,\\ in\\ step\\\n\\ \\ \\ \\ raise\\ exc\\\nRuntimeError:\\ foo\\\n', 'Traceback (most recent call last):\n File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_s...impy3-3.0.11/.pybuild/cpython3_3.13_simpy3/build/simpy/core.py", line 230, in step\n raise exc\nRuntimeError: foo\n') E + where <function match at 0xffffb80b6020> = re.match tests/test_exceptions.py:131: AssertionError =============================== warnings summary =============================== tests/test_benchmark.py:17 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:17: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:22 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:22: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:27 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:27: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:35 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:35: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:45 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:45: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:58 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:58: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:71 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:71: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:92 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:92: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') tests/test_benchmark.py:118 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:118: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') tests/test_benchmark.py:138 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build/tests/test_benchmark.py:138: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_exceptions.py::test_exception_chaining - AssertionError: Tr... ========== 1 failed, 139 passed, 10 deselected, 10 warnings in 2.05s =========== E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_simpy3/build; python3.13 -m pytest tests I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build; python3.12 -m pytest tests ============================= test session starts ============================== platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 rootdir: /<<PKGBUILDDIR>> configfile: setup.cfg plugins: typeguard-4.3.0 collected 150 items / 10 deselected / 140 selected tests/test_condition.py ..................... [ 15%] tests/test_environment.py ...... [ 19%] tests/test_event.py ......... [ 25%] tests/test_exceptions.py .......... [ 32%] tests/test_interrupts.py .......... [ 40%] tests/test_process.py .......... [ 47%] tests/test_resources.py ........................................ [ 75%] tests/test_rt.py ......... [ 82%] tests/test_timeout.py ..... [ 85%] tests/test_util.py .................... [100%] =============================== warnings summary =============================== tests/test_benchmark.py:17 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:17: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:22 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:22: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:27 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:27: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:35 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:35: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='frequent') tests/test_benchmark.py:45 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:45: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:58 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:58: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:71 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:71: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='targeted') tests/test_benchmark.py:92 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:92: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') tests/test_benchmark.py:118 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:118: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') tests/test_benchmark.py:138 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_simpy3/build/tests/test_benchmark.py:138: PytestUnknownMarkWarning: Unknown pytest.mark.benchmark - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.benchmark(group='simulation') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =============== 140 passed, 10 deselected, 10 warnings in 2.02s ================ dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 make: *** [debian/rules:11: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2024-09-19T08:06:02Z If required, the full build log is available here (for the next 30 days): https://debusine.debian.net/artifact/789034/ This bug has been filed at "normal" severity, as we haven't started the transition to add 3.13 as a supported version, yet. This will be raised to RC as soon as that happens, hopefully well before trixie. Thanks, Stefano

