Repository navigation
Update pyproject.toml and make "pytest" work again 'out-of-the-box' - #108
Open
Cor0n4V1rus wants to merge 1 commit into
Open
Cor0n4V1rus wants to merge 1 commit into
Cor0n4V1rus wants to merge 1 commit into
Conversation
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 "<frozen importlib._bootstrap>", line 1406, in _gcd_import
INTERNALERROR> File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
INTERNALERROR> File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
INTERNALERROR> File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
INTERNALERROR> File "<frozen importlib._bootstrap_external>", line 759, in exec_module
INTERNALERROR> File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
INTERNALERROR> File "/tmp/build-bot/cycler-0.12.1/.circleci/fetch_doc_logs.py", line 30, in <module>
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for those who prefer a 'TL;DR' version :
requires this change, so that
works (again and out-of-the-box).
I admit that
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
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.