Skip to content

Releases: kangtegong/pyftrace

v0.3.1

23 Dec 03:37
Compare
Choose a tag to compare

Added

  • Introduce -d/--depth option:
    • limit the tracing output to a specified call depth.

Changed

  • Change the output indentation.
    • Changed to have at least one indentation by default when a trace is started.
    • To distinguish it from the print statement of traced script.

v0.3.0

19 Dec 06:59
Compare
Choose a tag to compare

Added

  • New Examples:
    • examples/requests_example.py: Demonstrates tracing HTTP requests made via requests.get().
    • examples/torch_example.py: Demonstrates tracing with the torch library.
  • Enhanced Tracing Logic:
    • Introduced logic to detect if an external function call is triggered by user script code beyond the import phase.
    • Verbose mode (-v) now also traces standard library functions, not just built-ins.

Changed

  • ★ Support Python Version 3.8+ (Wider Python Version Support):
    • Lowered the minimum required Python version from 3.12 to 3.8. On Python 3.8~3.11, sys.setprofile is used; on 3.12 and above, sys.monitoring is used.
  • CI Configuration:
    • Simplified GitHub Actions CI matrix to use only ubuntu-latest for testing, removing Windows and macOS from the test matrix.
  • Codebase Refinements:
    • Consolidated and refactored the tracing logic to be more maintainable.
    • Merged PyftraceBase into tracer.py and refactored engines (pyftrace_monitoring.py, pyftrace_setprofile.py) to import from it directly.

Fixed

  • Top-level External Calls:
    • Fixed an issue where top-level external library calls would not appear in the trace because tracing started only after a call in the user script.
      • Now caller frames are checked: if the calling frame belongs to the user script after imports, tracing starts immediately.
  • Normalization of Paths and Encodings:
    • Ensured consistent path normalization and line ending handling.

v0.2.0

12 Nov 09:38
Compare
Choose a tag to compare

Added

  • TUI support
    • Added tui.py using curses for terminal-based UI.
    • Supports Page Up, Page Down, Home, and End keys for scrolling through trace data.
    • New example script examples/recursives.py for testing deep trace depth in TUI.
  • Argument handling for traced scripts:
    • pyftrace now supports passing additional arguments to traced scripts in both CLI and TUI modes.
  • Cross-platform testing on GitHub Actions:
    • Added workflows for testing on Ubuntu, Windows, and macOS.

Changed

  • Swapped short options for verbose and version flags:
    • verbose now uses -v (lowercase), and version uses -V (uppercase).
  • Documentation updates:
    • README workflow status badges.
    • README Installation instructions for Windows users (noting windows-curses).

Fixed

  • Function call parsing logic updated for Windows to handle backslashes in paths.

v0.1.2

31 Oct 16:45
Compare
Choose a tag to compare

Added

  • GitHub Workflows.
    • Introduced push-test.yml workflow to automatically run tests on every push.
    • Added python-publish.yml workflow for Python package publishing.

Changed

  • Dynamic Versioning in Tests.
    • Refactored tests in runtests.py to dynamically retrieve the __version__ from pyftrace/__init__.py.

v0.1.1

31 Oct 00:43
Compare
Choose a tag to compare

Added

  • Test suite for pyftrace (runtests.py).

  • -v, --version option to display the current version of pyftrace.

    $ pyftrace -v
    pyftrace version 0.1.1
    $ pyftrace --version
    pyftrace version 0.1.1

Changed

  • Renamed class SimplePyftrace to Pyftrace.

Fixed

  • Aligned the printed output for called and returned function traces to have consistent depth levels for readability.
  • Updated related test code to reflect these alignment changes.