File tree 4 files changed +9
-13
lines changed
4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 2
2
# Copyright 2021- Python Language Server Contributors.
3
3
4
4
import argparse
5
+ import json
5
6
import logging
6
7
import logging .config
7
8
import sys
8
9
import time
9
10
10
- try :
11
- import ujson as json
12
- except Exception :
13
- import json
14
-
15
11
from ._version import __version__
16
12
from .python_lsp import (
17
13
PythonLSPServer ,
Original file line number Diff line number Diff line change 15
15
from pylsp import hookimpl , lsp
16
16
17
17
try :
18
- import ujson as json
19
- except Exception :
18
+ import orjson as json
19
+ except ImportError :
20
20
import json
21
21
22
22
log = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 9
9
from functools import partial
10
10
from typing import Any , Dict , List
11
11
12
- try :
13
- import ujson as json
14
- except Exception :
15
- import json
16
-
17
12
from pylsp_jsonrpc .dispatchers import MethodDispatcher
18
13
from pylsp_jsonrpc .endpoint import Endpoint
19
14
from pylsp_jsonrpc .streams import JsonRpcStreamReader , JsonRpcStreamWriter
20
15
16
+ try :
17
+ import orjson as json
18
+ except ImportError :
19
+ import json
20
+
21
21
from . import _utils , lsp , uris
22
22
from ._version import __version__
23
23
from .config import config
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ dependencies = [
18
18
" jedi>=0.17.2,<0.20.0" ,
19
19
" pluggy>=1.0.0" ,
20
20
" python-lsp-jsonrpc>=1.1.0,<2.0.0" ,
21
- " ujson >=3.0 .0" ,
21
+ " orjson >=3.10 .0" ,
22
22
]
23
23
dynamic = [" version" ]
24
24
You can’t perform that action at this time.
0 commit comments