-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
_IncompleteInputError is leaked in the REPL if input compilation emits SystemError #150732
Copy link
Copy link
Open
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Fields
Give feedbackNo fields configured for issues without a type.
Bug report
Bug description:
During investigating #150700 I found that running the snippet
class X: [(lambda: __class__)() for () in ()]causes the following bugs to appear:_IncompleteInputError, which aborts writing the user input to historyTracebackis shown immediately after the prompt string>>>I believe this could be handled and
_IncompleteInputErrorcould be prevented from being leaked, although rare enough to decide otherwise. Let's see how much a fix would cost (I'm optimistic).CPython versions tested on:
3.14, 3.15, 3.16, CPython main branch
Operating systems tested on:
macOS