Skip to content

Commit a06bbbf

Browse files
committed
Release v0.3.0
- Wider Python version support: - Lowered minimum Python version requirement to 3.8. - Uses `sys.setprofile` for Python 3.8~3.11 and `sys.monitoring` for 3.12+. - Enhanced tracing logic to handle top-level external calls after imports: - Now checks caller frames to start tracing even if the first external function call occurs right after imports. - Verbose mode improvements: - `-v` now traces standard library functions in addition to built-ins, providing more detailed insights. - Added new examples: - `requests_example.py` and `torch_example.py` demonstrate tracing external libraries. - Various code refinements and bug fixes: - Consolidated tracing logic and removed redundant code. - Improved path normalization and encoding handling for cross-platform consistency.
1 parent 434337c commit a06bbbf

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## [0.3.0] - 2024-12-19
4+
5+
### Added
6+
- New Examples:
7+
- `examples/requests_example.py`: Demonstrates tracing HTTP requests made via `requests.get()`.
8+
- `examples/torch_example.py`: Demonstrates tracing with the `torch` library.
9+
- Enhanced Tracing Logic:
10+
- Introduced logic to detect if an external function call is triggered by user script code beyond the import phase.
11+
- Verbose mode (`-v`) now also traces standard library functions, not just built-ins.
12+
13+
### Changed
14+
- ★ Support Python Version 3.8+ (Wider Python Version Support):
15+
- 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.
16+
- CI Configuration:
17+
- Simplified GitHub Actions CI matrix to use only `ubuntu-latest` for testing, removing Windows and macOS from the test matrix.
18+
- Codebase Refinements:
19+
- Consolidated and refactored the tracing logic to be more maintainable.
20+
- Merged `PyftraceBase` into `tracer.py` and refactored engines (`pyftrace_monitoring.py`, `pyftrace_setprofile.py`) to import from it directly.
21+
22+
### Fixed
23+
- Top-level External Calls:
24+
- 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.
25+
- Now caller frames are checked: if the calling frame belongs to the user script after imports, tracing starts immediately.
26+
- Normalization of Paths and Encodings:
27+
- Ensured consistent path normalization and line ending handling.
28+
29+
---
30+
331
## [0.2.0] - 2024-11-11
432

533
### Added

pyftrace/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.2.0"
1+
__version__ = "0.3.0"
22

33
from .tracer import get_tracer
44

0 commit comments

Comments
 (0)