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
Explicitly use "python" ijson backend #17787
Explicitly use "python" ijson backend #17787
Conversation
ijson provides a few backends with varying levels of compatibility and performance; which backend is chosen by ijson is system-dependent. Unfortunately the yajl2 backend does not play nicely with the JSON output by go list and throws an IncompleteJSONError when parsing. As a workaround, we can explicitly use the pure Python backend which is able to parse Go's output correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for digging into this and submitting a patch!
Thanks for the fix! Looks like mypy is choking on missing type stubs for the backend. Hmm. |
Change this to end in Line 66 in 3ffb10e
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggested edits will fix the mypy failure in CI.
Oh, or Eric's suggestion is even better. |
Head branch was pushed to by a user without write access
Thanks @jcrumb-u21 ! I will merge when CI goes green. |
There's a test failure in there, but it looks unrelated to me @benjyw |
ijson provides a few backends with varying levels of compatibility and performance; which backend is chosen by ijson is system-dependent. Unfortunately the yajl2 backend does not play nicely with the JSON output by go list and throws an IncompleteJSONError when parsing. As a workaround, we can explicitly use the pure Python backend which is able to parse Go's output correctly. Closes pantsbuild#17778
ijson provides a few backends with varying levels of compatibility and performance; which backend is chosen by ijson is system-dependent. Unfortunately the yajl2 backend does not play nicely with the JSON output by go list and throws an IncompleteJSONError when parsing. As a workaround, we can explicitly use the pure Python backend which is able to parse Go's output correctly. Closes #17778
ijson provides a few backends with varying levels of compatibility and performance; which backend is chosen by ijson is system-dependent. Unfortunately the yajl2 backend does not play nicely with the JSON output by go list and throws an IncompleteJSONError when parsing.
As a workaround, we can explicitly use the pure Python backend which is able to parse Go's output correctly.
Closes #17778