We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab1b069 commit e16e37eCopy full SHA for e16e37e
1 file changed
pylsp/python_lsp.py
@@ -4,6 +4,7 @@
4
import logging
5
import os
6
import socketserver
7
+import sys
8
import threading
9
import uuid
10
from functools import partial
@@ -71,9 +72,13 @@ def shutdown_server(check_parent_process, *args):
71
72
handler_class.__name__ + "Handler",
73
(_StreamHandlerWrapper,),
74
{
- "DELEGATE_CLASS": partial(
75
- handler_class, check_parent_process=check_parent_process
76
- ),
+ # We need to wrap this in staticmethod due to the changes to
+ # functools.partial in Python 3.14+
77
+ "DELEGATE_CLASS": staticmethod(
78
+ partial(handler_class, check_parent_process=check_parent_process)
79
+ )
80
+ if sys.version_info >= (3, 14)
81
+ else partial(handler_class, check_parent_process=check_parent_process),
82
"SHUTDOWN_CALL": partial(shutdown_server, check_parent_process),
83
},
84
)
0 commit comments