This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients BTaskaya, lys.nikolaou, pablogsal, tusharsadhwani
Date 2022-01-25.17:14:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643130867.85.0.767560027119.issue46521@roundup.psfhosted.org>
In-reply-to
Content
> because my requirement is to detect if a code can be incomplete Python code, without ever compiling it.

AS I mentioned in other issues, unfortunately the new parser doesn't allow to do this as the old one does, because how it works. The codeop module hacks around this by comparing the error messages if you add new lines, which is know to be fragile and quite bug-friendly.

So I am afraid there is not going to be a reliable and supported way to do this with the new parser. You may need to use a 3rd party library that allows parsing incomplete code.
History
Date User Action Args
2022-01-25 17:14:27pablogsalsetrecipients: + pablogsal, lys.nikolaou, BTaskaya, tusharsadhwani
2022-01-25 17:14:27pablogsalsetmessageid: <1643130867.85.0.767560027119.issue46521@roundup.psfhosted.org>
2022-01-25 17:14:27pablogsallinkissue46521 messages
2022-01-25 17:14:27pablogsalcreate