Currently the way we detect incomplete errors in the codeop module is based on the exception text, which is suboptimal at least. To do this properly, add a new SyntaxError subclass called IncompleteInputError and use that in the codeop module to detect errors from the parser.
Linked PRs