File tree Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 22# Copyright 2021- Python Language Server Contributors.
33
44import argparse
5+ import json
56import logging
67import logging .config
78import sys
89import time
910
10- try :
11- import ujson as json
12- except Exception :
13- import json
14-
1511from ._version import __version__
1612from .python_lsp import (
1713 PythonLSPServer ,
Original file line number Diff line number Diff line change 1515from pylsp import hookimpl , lsp
1616
1717try :
18- import ujson as json
19- except Exception :
18+ import orjson as json
19+ except ImportError :
2020 import json
2121
2222log = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 99from functools import partial
1010from typing import Any , Dict , List
1111
12- try :
13- import ujson as json
14- except Exception :
15- import json
16-
1712from pylsp_jsonrpc .dispatchers import MethodDispatcher
1813from pylsp_jsonrpc .endpoint import Endpoint
1914from pylsp_jsonrpc .streams import JsonRpcStreamReader , JsonRpcStreamWriter
2015
16+ try :
17+ import orjson as json
18+ except ImportError :
19+ import json
20+
2121from . import _utils , lsp , uris
2222from ._version import __version__
2323from .config import config
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ dependencies = [
1818 " jedi>=0.17.2,<0.20.0" ,
1919 " pluggy>=1.0.0" ,
2020 " python-lsp-jsonrpc>=1.1.0,<2.0.0" ,
21- " ujson >=3.0 .0" ,
21+ " orjson >=3.10 .0" ,
2222]
2323dynamic = [" version" ]
2424
You can’t perform that action at this time.
0 commit comments