Skip to content

Commit 5eb4a00

Browse files
authored
Remove default alphabetical ordering of profiled functions in text output (#414)
* remove default alphabetical ordering of functions * clean up after removing default sorting * Update changelog * keep stats_order variable
1 parent 630abb0 commit 5eb4a00

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Changes
1212
* FIX: Use import system to locate module file run by ``kernprof -m`` #389
1313
* FIX: Fixed build on Windows-ARM64 and now building wheels therefor in CI #391
1414
* FIX: Move away from older, (temporarily-)deprecated ``importlib.resources`` APIs in ``line_profiler.toml_config`` #406
15+
* CHANGE: remove default alphabetical sorting of profiled functions
1516

1617
5.0.0
1718
~~~~~

line_profiler/line_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def show_text(stats, unit, output_unit=None, stream=None, stripzeros=False,
924924
stats_order = sorted(stats.items(), key=lambda kv: sum(t[2] for t in kv[1]))
925925
else:
926926
# Default ordering
927-
stats_order = sorted(stats.items())
927+
stats_order = stats.items()
928928

929929
# Pre-lookup the appropriate config file
930930
config = ConfigSource.from_config(config).path

0 commit comments

Comments
 (0)