Show a more meaningful error when sending code to the Python terminal.#25421
Show a more meaningful error when sending code to the Python terminal.#25421guoci wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
668272e to
366ee1b
Compare
366ee1b to
3b338ec
Compare
|
Thanks for the PR, I'm not sure how useful the error would be though. Usually it means we weren't able to do the "smarts" for smart send in terms of ast parsing the python file properly bc of outdated python version or invalid syntax somewhere in the file. What were the outputs you would see with this PR? |
For the above code, when there is invalid syntax, originally, the output will be: |
|
@anthonykim1 could you help out here? |
|
Thanks for the PR, I'm not sure if we want to go with this approach. @guoci
Maybe we could consider showing it as notification and that would be better |

If there is any syntax error in the file where the user sends code,
deprecatedwill be sent to the Python terminal. This PR modifies to show the exception fromast.parse.Related: #25117