File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 44import logging
55import os
66import socketserver
7+ import sys
78import threading
89import uuid
910from functools import partial
@@ -71,9 +72,13 @@ def shutdown_server(check_parent_process, *args):
7172 handler_class .__name__ + "Handler" ,
7273 (_StreamHandlerWrapper ,),
7374 {
74- "DELEGATE_CLASS" : partial (
75- handler_class , check_parent_process = check_parent_process
76- ),
75+ # We need to wrap this in staticmethod due to the changes to
76+ # 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 ),
7782 "SHUTDOWN_CALL" : partial (shutdown_server , check_parent_process ),
7883 },
7984 )
You can’t perform that action at this time.
0 commit comments