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
{{ message }}
Repository navigation
python3.15 -m profile.sample raises Error while finding module specification for 'profile.sample' #138374
3.15bugs and security fixesdocsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
Hi! I wanted to test the new sampling profiler on 3.15, as documented in the release notes.
So after building cpython from source (optimizations enabled, but I tried without as well), on an Apple M4, I create this little script that runs forever.
Then when running python3.15 -m profile.sample, the error appears:
$ python3.15 run.py &
$ python3.15 -m profile.sample <PID>
/usr/local/bin/python3.15: Error while finding module specification for 'profile.sample' (ModuleNotFoundError: __path__ attribute not found on 'profile' while trying to find 'profile.sample')
3.15bugs and security fixesdocsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
Activity
picnixz commentedon Sep 2, 2025
cc @pablogsal
picnixz commentedon Sep 2, 2025
Err maybe it's actually
profiling.samplinginstead? Lib/profile.py doesn't seem to have that entrypoint.pablogsal commentedon Sep 2, 2025
Yeah, this is being moved to
profiling.samplingafter #138122picnixz commentedon Sep 2, 2025
Maybe we should change the release notes then?
picnixz commentedon Sep 2, 2025
Thank you for the report. We updated the changelog in #138389!