From 1d5e207bd7eca53913262aef82ab0e78aad9c0c5 Mon Sep 17 00:00:00 2001 From: Cor0n4V1rus <60296087+Cor0n4V1rus@users.noreply.github.com> Date: Mon, 12 Oct 2026 20:58:29 +0200 Subject: [PATCH] Update pyproject.toml and make "pytest" work again 'out-of-the-box' for those who prefer a 'TL;DR' version : pyproject.toml requires this change, so that pytest works (again and out-of-the-box). I admit that pytest test_cycler.py would also do it, but I assume my change would be more future proof?? the more complete version : as of now, a simple pytest would yield something like ================================================= test session starts ================================================== platform linux -- Python 3.14.7, pytest-9.0.3, pluggy-1.6.0 codspeed: 5.0.3 (disabled, mode: walltime, callgraph: enabled, timer_resolution: 1.0ns) benchmark: 5.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) Using --randomly-seed=3775818194 rootdir: /tmp/build-bot/cycler-0.12.1 configfile: pyproject.toml plugins: pytest_httpserver-1.1.5, time-machine-3.4.0, benchmark-5.2.3, xdist-3.8.0, regressions-2.5.0, pyfakefs-6.2.0, sugar-1.1.1, httpbin-2.1.0, codspeed-5.0.3, aspectlib-2.0.0, mock-3.14.1, datadir-1.5.0, trio-0.8.0, rerunfailures-16.6, Faker-40.33.0, hypothesis-6.165.10, xprocess-1.0.2, cov-7.1.0, respx-0.23.1, relaxed-2.0.2, anyio-4.15.0, asyncio-1.4.0, timeout-2.4.0, betamax-0.9.0, randomly-4.1.0 asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 0 items USAGE: fetch_doc_results.py CircleCI-build-url INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 318, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> ~~~~^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 371, in _main INTERNALERROR> config.hook.pytest_collection(session=session) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 512, in __call__ INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall INTERNALERROR> raise exception INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall INTERNALERROR> teardown.throw(exception) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/logging.py", line 788, in pytest_collection INTERNALERROR> return (yield) INTERNALERROR> ^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall INTERNALERROR> teardown.throw(exception) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/warnings.py", line 98, in pytest_collection INTERNALERROR> return (yield) INTERNALERROR> ^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall INTERNALERROR> teardown.throw(exception) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/config/__init__.py", line 1409, in pytest_collection INTERNALERROR> return (yield) INTERNALERROR> ^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 382, in pytest_collection INTERNALERROR> session.perform_collect() INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 857, in perform_collect INTERNALERROR> self.items.extend(self.genitems(node)) INTERNALERROR> ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 1023, in genitems INTERNALERROR> yield from self.genitems(subnode) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 1023, in genitems INTERNALERROR> yield from self.genitems(subnode) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 1020, in genitems INTERNALERROR> rep, duplicate = self._collect_one_node(node, handle_dupes) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/main.py", line 883, in _collect_one_node INTERNALERROR> rep = collect_one_node(node) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 576, in collect_one_node INTERNALERROR> rep: CollectReport = ihook.pytest_make_collect_report(collector=collector) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 512, in __call__ INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall INTERNALERROR> raise exception INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall INTERNALERROR> teardown.throw(exception) INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/capture.py", line 880, in pytest_make_collect_report INTERNALERROR> rep = yield INTERNALERROR> ^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 400, in pytest_make_collect_report INTERNALERROR> call = CallInfo.from_call( INTERNALERROR> collect, "collect", reraise=(KeyboardInterrupt, SystemExit) INTERNALERROR> ) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 353, in from_call INTERNALERROR> result: TResult | None = func() INTERNALERROR> ~~~~^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 398, in collect INTERNALERROR> return list(collector.collect()) INTERNALERROR> ~~~~~~~~~~~~~~~~~^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/pytest_relaxed/classes.py", line 82, in collect INTERNALERROR> items = super().collect() INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 563, in collect INTERNALERROR> self._register_setup_module_fixture() INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 576, in _register_setup_module_fixture INTERNALERROR> self.obj, ("setUpModule", "setup_module") INTERNALERROR> ^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 289, in obj INTERNALERROR> self._obj = obj = self._getobj() INTERNALERROR> ~~~~~~~~~~~~^^ INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 560, in _getobj INTERNALERROR> return importtestmodule(self.path, self.config) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 507, in importtestmodule INTERNALERROR> mod = import_path( INTERNALERROR> path, INTERNALERROR> ...<2 lines>... INTERNALERROR> consider_namespace_packages=config.getini("consider_namespace_packages"), INTERNALERROR> ) INTERNALERROR> File "/usr/lib/python3.14/site-packages/_pytest/pathlib.py", line 587, in import_path INTERNALERROR> importlib.import_module(module_name) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ INTERNALERROR> File "/usr/lib/python3.14/importlib/__init__.py", line 88, in import_module INTERNALERROR> return _bootstrap._gcd_import(name[level:], package, level) INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ INTERNALERROR> File "", line 1406, in _gcd_import INTERNALERROR> File "", line 1371, in _find_and_load INTERNALERROR> File "", line 1342, in _find_and_load_unlocked INTERNALERROR> File "", line 938, in _load_unlocked INTERNALERROR> File "", line 759, in exec_module INTERNALERROR> File "", line 491, in _call_with_frames_removed INTERNALERROR> File "/tmp/build-bot/cycler-0.12.1/.circleci/fetch_doc_logs.py", line 30, in INTERNALERROR> sys.exit(1) INTERNALERROR> ~~~~~~~~^^^ INTERNALERROR> SystemExit: 1 mainloop: caught unexpected SystemExit! ================================================ no tests ran in 0.02s ================================================= As a side note : This error appears in various python packages and is annoying for Distribution Administrators, when I consider it's quite easy to fix. --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c7c79cb..728e03e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,6 @@ cycler = ["py.typed"] [build-system] requires = ["setuptools>=61"] build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +testpaths = ["test_cycler.py"]