Skip to content

Fix pyperformance venv (w/o any subcommand) exception - #454

Open
maurycy wants to merge 2 commits into
python:mainfrom
maurycy:fix-428-venv
Open

Fix pyperformance venv (w/o any subcommand) exception#454
maurycy wants to merge 2 commits into
python:mainfrom
maurycy:fix-428-venv

Conversation

@maurycy

@maurycymaurycy commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Now:

2026-01-26T19:29:17.403748000+0100 maurycy@gimel /Users/maurycy/work/pyperformance (fix-428-venv) % uv run --python 3.14 --with . python -m pyperformance venv
usage: pyperformance [-h] [-V] {run,show,compare,list,list_groups,compile,compile_all,upload,venv} ...
Compares the performance of baseline_python with changed_python and prints a report.
positional arguments:
{run,show,compare,list,list_groups,compile,compile_all,upload,venv}
run Run benchmarks on the running python
show Display a benchmark file
compare Compare two benchmark files
list List benchmarks of the running Python
list_groups List benchmark groups of the running Python
compile Compile and install CPython and run benchmarks on installed Python
compile_all Compile and install CPython and run benchmarks on installed Python on all branches and revisions of CONFIG_FILE
upload Upload JSON results to a Codespeed website
venv Actions on the virtual environment
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit

Before:

[1] 2026-03-23T10:53:38.530937000+0100 maurycy@gimel /Users/maurycy/src/github.com/maurycy/pyperformance (main) % uv run --python 3.14 --with . python -m pyperformance venv
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/maurycy/src/github.com/maurycy/pyperformance/pyperformance/__main__.py", line 3, in <module>
pyperformance.cli.main()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/Users/maurycy/src/github.com/maurycy/pyperformance/pyperformance/cli.py", line 422, in main
_main()
~~~~~^^
File "/Users/maurycy/src/github.com/maurycy/pyperformance/pyperformance/cli.py", line 371, in _main
info = _pythoninfo.get_info(options.python)
^^^^^^^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'python'

Fixes#428

@maurycymaurycy changed the title Fix pyperformance venv (w/o any subcommand) crashFix pyperformance venv (w/o any subcommand) exceptionJan 26, 2026
Sign up for freeto 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.

Unhelpful venv failure

1 participant

@maurycy