aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2022-12-18 19:41:29 +0300
committershadchin <shadchin@yandex-team.com>2022-12-18 19:41:29 +0300
commit2805ea37cb7c4f7daa09550cdc8de801ad4c0ced (patch)
tree87061356e721368cd97fcc5165b4255a7220b085
parent90ddaa030f7c2e10a7f9ee7ef47fabdcec738ffb (diff)
downloadydb-2805ea37cb7c4f7daa09550cdc8de801ad4c0ced.tar.gz
Fix yatest with Python 3.11
-rw-r--r--library/python/testing/yatest_common/yatest/common/canonical.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py
index 6e61e6485a..e8bc893484 100644
--- a/library/python/testing/yatest_common/yatest/common/canonical.py
+++ b/library/python/testing/yatest_common/yatest/common/canonical.py
@@ -15,7 +15,8 @@ yatest_logger = logging.getLogger("ya.test")
def _copy(src, dst, universal_lines=False):
if universal_lines:
with open(dst, "wb") as f:
- for line in open(src, "rbU"):
+ mode = "rbU" if six.PY2 else "rb"
+ for line in open(src, mode):
f.write(line)
return
shutil.copy(src, dst)