unstale

pypi / line-profiler

line-profiler

What changed in line-profiler 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.

1 breaking2 new APIs and options1 performance12 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.2 on npm

line-profiler 516 changes

Breaking changes 1

  • Text output no longer defaults to alphabetical ordering of profiled functions.

    5.0.1release notes

New APIs and options 2

  • LineStats aggregation is added, allowing line statistics to be aggregated.

    5.0.1release notes

  • Adds an IPython magic function for profiling with %%lprun_all.

    5.0.1release notes

Performance 1

  • Worst-case overhead is reduced, improving performance when profiling.

    5.0.1release notes

Fixes and other changes 12

  • Decorating a function no longer destroys its type.

    5.1.0release notes

  • Handling of multi-target from-import statements was fixed.

    5.1.0release notes

  • kernprof now always runs code in sys.modules['__main__']'s namespace.

    5.1.0release notes

  • Running kernprof.main no longer reverts the entirety of sys.modules.

    5.1.0release notes

  • Bytecode for profiled functions is always padded.

    5.1.0release notes

  • Recursive calls are now counted correctly.

    5.1.0release notes

  • The typing of ScopingPolicy members was fixed.

    5.1.0release notes

  • Unencodable characters are escaped instead of causing lines to be dropped.

    5.1.0release notes

  • A type fix was made to the base; the notes do not specify further details.

    5.0.2release notes

  • File resolution for files executed with kernprof -m now uses the import system.

    5.0.1release notes

  • Fixes and build changes improve compatibility with Python 3.14, including preventing duplicate output.

    5.0.1release notes

  • Reference-count leaks are fixed.

    5.0.1release notes