Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

python3.15 -m profile.sample raises Error while finding module specification for 'profile.sample' #138374

Copy link
Copy link
@alexprengere

Description

@alexprengere
Issue body actions

Bug report

Bug description:

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.

# run.py
i = 0
try:
    while 1:
        i += 1
except KeyboardInterrupt:
    print(f"\nLooped {i} times")

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')

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    Status
    Todo
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.