Skip to content
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

"strict" mode does not work with builtin python #20

Open
dvcrn opened this issue Aug 28, 2019 · 2 comments
Open

"strict" mode does not work with builtin python #20

dvcrn opened this issue Aug 28, 2019 · 2 comments

Comments

@dvcrn
Copy link

dvcrn commented Aug 28, 2019

The python that comes with ST3 is 3.3 which doesn't have detailed error reporting for json parse errors yet:

>>> import sys
>>> sys.version
'3.3.6 (default, Mar 30 2018, 11:14:15) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]'
>>> import json
>>> json.loads("foo")
Traceback (most recent call last):
  File "./python3.3/json/decoder.py", line 367, in raw_decode
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "./python3.3/json/__init__.py", line 316, in loads
  File "./python3.3/json/decoder.py", line 351, in decode
  File "./python3.3/json/decoder.py", line 369, in raw_decode
ValueError: No JSON object could be decoded

For this linter to work it needs a higher python version or use simplejson

@braver
Copy link
Member

braver commented Aug 28, 2019

Thanks for reporting. Currently, the design of this plugin doesn't allow us to spin this off to an external python. I also don't want to introduce a dependency like simplejson. So, currently this is a "won't fix", but it's good to keep this open to see if the situation changes in a way that would allow us to improve here. Or if future versions of ST resolve the issue by shipping a newer version of python. I know they are actively working on finding a way to do exactly that, so who knows.

@dvcrn
Copy link
Author

dvcrn commented Aug 28, 2019

In my fork I added simplejson as dependency to get the linter working here. It works fine but I understand not wanting to introduce it.

I'll run with my own fork for the time being then until this is resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants