Skip to content

Commit

Permalink
Reject --tracemalloc in pyperf command
Browse files Browse the repository at this point in the history
  • Loading branch information
oraluben committed May 23, 2022
1 parent 968f247 commit 7363cea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion TODO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ BUGS
====

* Repair PyPy on Travis
* Reject --tracemalloc in bench_command()
* BUG: "python pyperf timeit --compare-to=pypy" doesn't tune correctly the runner
for pypy. pypy requires more warmup values (10) than cpython (1).
* BUG: --duplicate of timeit must be ignored in PyPy, see the discussion
Expand Down
6 changes: 6 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

Version 2.3.2
-------------

* Reject --tracemalloc in ``pyperf command``.
Patch by Yichen Yan

Version 2.3.1 (2022-02-03)
--------------------------

Expand Down
2 changes: 2 additions & 0 deletions pyperf/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ def _process_args_impl(self):
self._only_in_worker("--worker-task")

if args.tracemalloc:
if args.action == 'command':
raise CLIError('--tracemalloc cannot be used with pyperf command')
try:
import tracemalloc # noqa
except ImportError as exc:
Expand Down

0 comments on commit 7363cea

Please sign in to comment.