Skip to content

minor: Fix pytest instructions in the README#1477

Merged
timsaucer merged 1 commit intoapache:mainfrom
nuno-faria:fix_readme
Apr 5, 2026
Merged

minor: Fix pytest instructions in the README#1477
timsaucer merged 1 commit intoapache:mainfrom
nuno-faria:fix_readme

Conversation

@nuno-faria
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

N/A.

Rationale for this change

When following the pytest instructions in the README, I got the following error (Ubuntu 24):

======================================================================= test session starts ========================================================================
platform linux -- Python 3.14.3, pytest-8.3.4, pluggy-1.5.0
rootdir: /datafusion-python
configfile: pyproject.toml
plugins: asyncio-0.25.3
asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=function
collected 0 items / 3 errors
Usage: /datafusion-python/.venv/bin/pytest exclude_globs.lst rat_report.xml
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 283, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>                          ~~~~^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 336, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/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 "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR>     teardown.throw(exception)  # type: ignore[union-attr]
INTERNALERROR>     ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/logging.py", line 790, in pytest_collection
INTERNALERROR>     return (yield)
INTERNALERROR>             ^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR>     teardown.throw(exception)  # type: ignore[union-attr]
INTERNALERROR>     ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/warnings.py", line 121, in pytest_collection
INTERNALERROR>     return (yield)
INTERNALERROR>             ^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR>     teardown.throw(exception)  # type: ignore[union-attr]
INTERNALERROR>     ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/config/__init__.py", line 1417, in pytest_collection
INTERNALERROR>     return (yield)
INTERNALERROR>             ^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 347, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 809, in perform_collect
INTERNALERROR>     self.items.extend(self.genitems(node))
INTERNALERROR>     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 975, in genitems
INTERNALERROR>     yield from self.genitems(subnode)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 975, in genitems
INTERNALERROR>     yield from self.genitems(subnode)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 975, in genitems
INTERNALERROR>     yield from self.genitems(subnode)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 970, in genitems
INTERNALERROR>     rep, duplicate = self._collect_one_node(node, handle_dupes)
INTERNALERROR>                      ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/main.py", line 835, in _collect_one_node
INTERNALERROR>     rep = collect_one_node(node)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/runner.py", line 567, in collect_one_node
INTERNALERROR>     rep: CollectReport = ihook.pytest_make_collect_report(collector=collector)
INTERNALERROR>                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR>            ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/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 "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR>     teardown.throw(exception)  # type: ignore[union-attr]
INTERNALERROR>     ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/capture.py", line 860, in pytest_make_collect_report
INTERNALERROR>     rep = yield
INTERNALERROR>           ^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/runner.py", line 391, in pytest_make_collect_report
INTERNALERROR>     call = CallInfo.from_call(
INTERNALERROR>         collect, "collect", reraise=(KeyboardInterrupt, SystemExit)
INTERNALERROR>     )
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/runner.py", line 341, in from_call
INTERNALERROR>     result: TResult | None = func()
INTERNALERROR>                              ~~~~^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/runner.py", line 389, in collect
INTERNALERROR>     return list(collector.collect())
INTERNALERROR>                 ~~~~~~~~~~~~~~~~~^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py", line 738, in _patched_collect
INTERNALERROR>     module = collector.obj
INTERNALERROR>              ^^^^^^^^^^^^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/python.py", line 284, in obj
INTERNALERROR>     self._obj = obj = self._getobj()
INTERNALERROR>                       ~~~~~~~~~~~~^^
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/python.py", line 546, in _getobj
INTERNALERROR>     return importtestmodule(self.path, self.config)
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/python.py", line 493, in importtestmodule
INTERNALERROR>     mod = import_path(
INTERNALERROR>         path,
INTERNALERROR>     ...<2 lines>...
INTERNALERROR>         consider_namespace_packages=config.getini("consider_namespace_packages"),
INTERNALERROR>     )
INTERNALERROR>   File "/datafusion-python/.venv/lib/python3.14/site-packages/_pytest/pathlib.py", line 587, in import_path
INTERNALERROR>     importlib.import_module(module_name)
INTERNALERROR>     ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
INTERNALERROR>   File "/root/.local/share/uv/python/cpython-3.14.3-linux-x86_64-gnu/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 1398, 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 "/datafusion-python/dev/release/check-rat-report.py", line 28, in <module>
INTERNALERROR>     sys.exit(1)
INTERNALERROR>     ~~~~~~~~^^^
INTERNALERROR> SystemExit: 1
mainloop: caught unexpected SystemExit!

======================================================================== 3 errors in 0.14s =========================================================================

The solution is to remove the dot in the uv run --no-project pytest command.

What changes are included in this PR?

Minor change to the README.

Are there any user-facing changes?

No.

Copy link
Copy Markdown
Member

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@timsaucer timsaucer merged commit ff15648 into apache:main Apr 5, 2026
21 checks passed
@nuno-faria nuno-faria deleted the fix_readme branch April 5, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants