aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2022-08-14 19:18:31 +0300
committershadchin <shadchin@yandex-team.com>2022-08-14 19:18:31 +0300
commitde599f9839ac0c83e84057efbb81ea0840c1a4b5 (patch)
treed24108165d0af20614fa9e1d256ba775465c25d8 /library
parent587d76a0f761fa6405b42e0a863ea5d78d2f1dbb (diff)
downloadydb-de599f9839ac0c83e84057efbb81ea0840c1a4b5.tar.gz
Switch on inspect.getfullargspec
The `inspect.getargspec` function, deprecated since Python 3.0; use `inspect.signature()` or `inspect.getfullargspec()` instead.
Diffstat (limited to 'library')
-rw-r--r--library/python/testing/yatest_common/yatest/common/process.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py
index 5d64544f7c..c2dec1f7c1 100644
--- a/library/python/testing/yatest_common/yatest/common/process.py
+++ b/library/python/testing/yatest_common/yatest/common/process.py
@@ -555,7 +555,12 @@ def execute(
'user_stderr': user_stderr,
}
- if 'core_pattern' in inspect.getargspec(executor.__init__).args:
+ if six.PY2:
+ executor_args = inspect.getargspec(executor.__init__).args
+ else:
+ executor_args = inspect.getfullargspec(executor.__init__).args
+
+ if 'core_pattern' in executor_args:
kwargs.update([('core_pattern', core_pattern)])
res = executor(command, process, out_file, err_file, process_progress_listener,