You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIX: use import system to resolve file executed by kernprof -m (#389)
* Optionally use `importlib` in `kernprof.find_module_script()`
* Added test
* changelog
* Test both explicit profiling and autoprofiling
* Fixes
- `kernprof.py::find_module_script()`:
Added context manager around call to `importlib.util.find_spec()` to
minimize side effects
- `tests/test_kernprof.py::test_kernprof_sys_restoration()`:
Updated test implementation to better protect `sys.modules` (because
the test is run in-process)
* Don't revert `sys.modules` in `find_module_script()`
Copy file name to clipboardExpand all lines: CHANGELOG.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ Changes
8
8
* FIX: mitigate speed regressions introduced in 5.0.0
9
9
* ENH: Added capability to combine profiling data both programmatically (``LineStats.__add__()``) and via the CLI (``python -m line_profiler``) (#380, originally proposed in #219)
10
10
* FIX: search function in online documentation
11
+
* FIX: Use import system to locate module file run by ``kernprof -m`` #389
0 commit comments