Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject --tracemalloc in pyperf command #131

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4.1
-------------

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

Version 2.4.0 (2022-07-20)
--------------------------

Expand Down
2 changes: 2 additions & 0 deletions pyperf/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,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