Skip to content

Commit f6a7c02

Browse files
author
Leo Ji
committed
deps: replace deprecated ujson with orjson
UJSON is deprecated and no longer recommended. Replace with orjson, which is the recommended alternative. Changes: - pyproject.toml: update dependency from ujson to orjson - pylsp/__main__.py: import orjson instead of ujson - pylsp/plugins/pylint_lint.py: import orjson instead of ujson - pylsp/python_lsp.py: import orjson instead of ujson Fixes #673
1 parent bc1095f commit f6a7c02

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pylsp/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import time
99

1010
try:
11-
import ujson as json
11+
import orjson as json
1212
except Exception:
1313
import json
1414

pylsp/plugins/pylint_lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from pylsp import hookimpl, lsp
1616

1717
try:
18-
import ujson as json
18+
import orjson as json
1919
except Exception:
2020
import json
2121

pylsp/python_lsp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from typing import Any
1212

1313
try:
14-
import ujson as json
14+
import orjson as json
1515
except Exception:
1616
import json
1717

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies = [
1919
"jedi>=0.17.2,<0.20.0",
2020
"pluggy>=1.0.0",
2121
"python-lsp-jsonrpc>=1.1.0,<2.0.0",
22-
"ujson>=3.0.0",
22+
"orjson>=3.0.0",
2323
"black"
2424
]
2525
dynamic = ["version"]

0 commit comments

Comments
 (0)