File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
ydb/library/yql/udfs/common/python/python_udf Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11#include " python_udf.h"
22#include " python_function_factory.h"
33
4- #include < ydb/library/yql/public/udf/udf_version.h>
5- #include < ydb/library/yql/udfs/common/python/bindings/py_utils.h>
4+ #include < contrib/ ydb/library/yql/public/udf/udf_version.h>
5+ #include < contrib/ ydb/library/yql/udfs/common/python/bindings/py_utils.h>
66
77#include < util/generic/vector.h>
88#include < util/system/execpath.h>
@@ -76,9 +76,10 @@ os.environ['OPENBLAS_NUM_THREADS'] = '1'
7676import sys
7777import threading
7878if sys.version_info >= (3, 0):
79- from io import StringIO
79+ from io import StringIO, TextIOWrapper as SysStderrType
8080else:
8181 from cStringIO import StringIO
82+ SysStderrType = file
8283
8384class StderrLocal(threading.local):
8485
@@ -108,7 +109,8 @@ class StderrProxy(object):
108109
109110 return getattr(target, attr)
110111
111- sys.stderr = StderrProxy(sys.stderr)
112+ if isinstance(sys.stderr, SysStderrType):
113+ sys.stderr = StderrProxy(sys.stderr)
112114)" );
113115 Y_ABORT_UNLESS (rc >= 0 , " Can't setup module" );
114116
You can’t perform that action at this time.
0 commit comments