GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Drop ujson and switch to orjson · python-lsp/python-lsp-server@5a053c7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pylsp
    • __main__.py
    • plugins
      • pylint_lint.py
    • python_lsp.py
  • pyproject.toml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pylsp/__main__.py‎

Copy file name to clipboardExpand all lines: pylsp/__main__.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22
# Copyright 2021- Python Language Server Contributors.
33

44
import argparse
5+
import json
56
import logging
67
import logging.config
78
import sys
89
import time
910

10-
try:
11-
import ujson as json
12-
except Exception:
13-
import json
14-
1511
from ._version import __version__
1612
from .python_lsp import (
1713
PythonLSPServer,
Collapse file

‎pylsp/plugins/pylint_lint.py‎

Copy file name to clipboardExpand all lines: pylsp/plugins/pylint_lint.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from pylsp import hookimpl, lsp
1616

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

2222
log = logging.getLogger(__name__)
Collapse file

‎pylsp/python_lsp.py‎

Copy file name to clipboardExpand all lines: pylsp/python_lsp.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from typing import Any, Dict, List
1111

1212
try:
13-
import ujson as json
14-
except Exception:
13+
import orjson as json
14+
except ImportError:
1515
import json
1616

1717
from pylsp_jsonrpc.dispatchers import MethodDispatcher
Collapse file

‎pyproject.toml‎

Copy file name to clipboardExpand all lines: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
]
2323
dynamic = ["version"]
2424

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.