Skip to content

Commit 143d993

Browse files
dalthvizccordoba12
authored andcommitted
Remove ujson dependency on Windows (requires MSVC compiler) (#704)
1 parent c3bb2f2 commit 143d993

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

pyls/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
import logging.config
55
import sys
66

7-
import ujson as json
7+
try:
8+
import ujson as json
9+
except Exception: # pylint: disable=broad-except
10+
import json
811

912
from .python_ls import (PythonLanguageServer, start_io_lang_server,
1013
start_tcp_lang_server)

pyls/plugins/pylint_lint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
import logging
55
import sys
66

7-
import ujson as json
87
from pylint.epylint import py_run
98
from pyls import hookimpl, lsp
109

10+
try:
11+
import ujson as json
12+
except Exception: # pylint: disable=broad-except
13+
import json
14+
1115
log = logging.getLogger(__name__)
1216

1317

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
'future>=0.14.0; python_version<"3"',
3737
'backports.functools_lru_cache; python_version<"3.2"',
3838
'jedi>=0.14.1,<0.16',
39-
'python-jsonrpc-server>=0.3.0',
39+
'python-jsonrpc-server>=0.3.2',
4040
'pluggy',
41-
'ujson<=1.35'
41+
'ujson<=1.35; platform_system!="Windows"'
4242
],
4343

4444
# List additional groups of dependencies here (e.g. development

0 commit comments

Comments
 (0)