Skip to content

Commit 1e8dadf

Browse files
address pr comments
1 parent 7547dc0 commit 1e8dadf

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎doc/changelog.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Version 1.15.0 (unreleased)
66
* Add support for Python 3.15 and drop 3.10
77
* Bump tornado to 6.6 (fixes ``BufferError`` on PyPy)
88
* Bump genshi to 0.7.12 (fixes ``TypeError`` on Python 3.15)
9+
* Fix benchmark selection checking Python version requirements against the
10+
running interpreter instead of the target specified by ``--python``
911

1012
Version 1.14.0 (2026-02-07)
1113
---------------------------

‎pyperformance/cli.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def parse_args():
185185
cmd.add_argument("changed_filename", metavar="changed_file.json")
186186

187187
# list
188-
cmd = subparsers.add_parser("list", help="List benchmarks of the running Python")
188+
cmd = subparsers.add_parser("list", help="List benchmarks of the target Python")
189189
cmds.append(cmd)
190190
filter_opts(cmd)
191191

@@ -343,13 +343,13 @@ def parse_entry(o, s):
343343
# Get the selections.
344344
selected = []
345345
info = _pythoninfo.get_info(python)
346-
this_python_version = ".".join(map(str, info.sys.version_info[:3]))
346+
target_python_version = ".".join(map(str, info.sys.version_info[:3]))
347347
for bench in _benchmark_selections.iter_selections(manifest, parsed_infos):
348348
if isinstance(bench, str):
349349
logging.warning(f"no benchmark named {bench!r}")
350350
continue
351351
# Filter using the target interpreter, which may differ from the running Python.
352-
if this_python_version in bench.python:
352+
if target_python_version in bench.python:
353353
selected.append(bench)
354354

355355
return selected

0 commit comments

Comments
 (0)