Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 245da20

Browse files
SavalekСавеленко Алексей Николаевич
and
Савеленко Алексей Николаевич
authored
Add fallback for ujson import (python-lsp#541)
Co-authored-by: Савеленко Алексей Николаевич <a.savelenko@tinkoff.ru>
1 parent 433c6a6 commit 245da20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pylsp/python_lsp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
from functools import partial
1010
from typing import Any, Dict, List
1111

12-
import ujson as json
12+
try:
13+
import ujson as json
14+
except Exception:
15+
import json
16+
1317
from pylsp_jsonrpc.dispatchers import MethodDispatcher
1418
from pylsp_jsonrpc.endpoint import Endpoint
1519
from pylsp_jsonrpc.streams import JsonRpcStreamReader, JsonRpcStreamWriter

0 commit comments

Comments
 (0)