Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

REPL shows source code from_pyrepl.__main__.py #129098

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@WolframAlph

Description

@WolframAlph

Bug report

Bug description:

When usingcompile built-in function and providing non-existing filename, REPL shows source lines from_pyrepl.__main__.py if exception occurs. Reproducer:

Python 3.14.0a4+ (heads/main-dirty:ed6934e71e5, Jan 20 2025, 18:59:25) [Clang 16.0.0 (clang-1600.0.26.6)] on darwinType"help","copyright","credits" or"license"for more information.>>> eval(compile("val","non-existing-file","eval"))

Results in:

Traceback (most recent call last):  File"<python-input-0>", line 1,in<module>    eval(compile("val","non-existing-file","eval"))~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"non-existing-file", line 1,in<module># Important: don't add things to this module, as they will end up in the REPL'sNameError: name'val' is not defined. Did you mean:'eval'?>>>

traceback with following line:# Important: don't add things to this module, as they will end up in the REPL's. This is first line fromLib/_pyrepl/__main__.py.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp