New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-43950: Implement fine grained error locations for interactive mode #92827
base: main
Are you sure you want to change the base?
bpo-43950: Implement fine grained error locations for interactive mode #92827
Conversation
I'm confused. The original PR #27117 is still open, even if it is a draft and the original design questions already remain. Why have you opened another PR? Have you contacted @isidentical first to take his code/approach? We still need to decide if this is a good idea because this has drawbacks, which is one of the reasons we didn't pursue this originally. |
Alright, so I have to close this one? |
Well, you don't have to but the aspects and questions I have mentioned still stand. Particularly and most importantly, if you have taken code directly from #27117 then you need first to have the author's permission, otherwise, we won't be able to merge this even if we wanted. |
My PR can be used as a baseline, no worries on that end (though I have some reservations about the implementation, especially the new code field). |
Yeah, that's what I dislike the most and I think this may make it a no-go. At the end of the day the reason we left it there was because the extra overhead and complexity was not worth the advantages as other reprls like Ipython will not even benefit from it. |
Original issue number: #88116
Most of the implementation comes from #27117. Changes include new fields in the
compiler
struct (.c_source
) and thePyCodeObject
object (.co_source
) to overcome the problem in the old PR by storing the source locally instead of globally. A newsource
argument was also added to_PyAST_Compile()
to pass the source from the parser to the compiler.