Skip to content

Commit 1fd8dae

Browse files
authored
Reject --tracemalloc in pyperf command (psf#131)
1 parent 6be960e commit 1fd8dae

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

TODO.rst

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ BUGS
22
====
33

44
* Repair PyPy on Travis
5-
* Reject --tracemalloc in bench_command()
65
* BUG: "python pyperf timeit --compare-to=pypy" doesn't tune correctly the runner
76
for pypy. pypy requires more warmup values (10) than cpython (1).
87
* BUG: --duplicate of timeit must be ignored in PyPy, see the discussion

doc/changelog.rst

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
Version 2.4.1
5+
-------------
6+
7+
* Reject --tracemalloc in ``pyperf command``.
8+
Patch by Yichen Yan
9+
410
Version 2.4.0 (2022-07-20)
511
--------------------------
612

pyperf/_runner.py

+2
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ def _process_args_impl(self):
324324
self._only_in_worker("--worker-task")
325325

326326
if args.tracemalloc:
327+
if args.action == 'command':
328+
raise CLIError('--tracemalloc cannot be used with pyperf command')
327329
try:
328330
import tracemalloc # noqa
329331
except ImportError as exc:

0 commit comments

Comments
 (0)