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

code.InteractiveInterpreter.runsource() regression on Python 3.12+ #113703

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
@gpotter2

Description

@gpotter2

Bug report

Bug description:

InteractiveInterpreter.runsource() is supposed to return True when the input is incomplete, as per the doc:https://docs.python.org/3/library/code.html#code.InteractiveInterpreter.runsource. This appears to have regressed with f-strings in Python 3.12+

Python 3.11.2:

>>>code.InteractiveInterpreter().runsource('a = f"""')True

Python 3.12.1 or Python 3.13.0a2+ (heads/main:1ae7ceba29, Jan 4 2024, 16:18:49):

>>>code.InteractiveInterpreter().runsource('a = f"""')File"<input>",line1a= f"""^SyntaxError:unterminatedtriple-quotedf-stringliteral (detectedatline1)False

CPython versions tested on:

3.11, 3.12, 3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-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