aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnermolaev <snermolaev@yandex-team.com>2023-09-20 09:55:52 +0300
committersnermolaev <snermolaev@yandex-team.com>2023-09-20 10:30:49 +0300
commit12dab647f0e4a604fd6e3421866361b3fd5f5d8d (patch)
tree579054e4476cf084d2ce95f27213c5e03df410f4
parentc78263f3defefa0d9e04bc9af5b72c855a886dcf (diff)
downloadydb-12dab647f0e4a604fd6e3421866361b3fd5f5d8d.tar.gz
build ymake with py3-ymake
-rw-r--r--build/plugins/_common.py3
-rw-r--r--build/plugins/pybuild.py5
-rw-r--r--build/plugins/ytest.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/build/plugins/_common.py b/build/plugins/_common.py
index 7fc1593df0..7c595dd492 100644
--- a/build/plugins/_common.py
+++ b/build/plugins/_common.py
@@ -1,3 +1,4 @@
+import six
import sys
import hashlib
import base64
@@ -22,7 +23,7 @@ def lazy(func):
def pathid(path):
- return base64.b32encode(hashlib.md5(path).digest()).lower().strip('=')
+ return six.ensure_str(base64.b32encode(hashlib.md5(six.ensure_binary(path)).digest()).lower().strip(b'='))
def listid(l):
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index bd66b1ef70..29ac197273 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -1,5 +1,6 @@
-import os
import collections
+import os
+import six
from hashlib import md5
import ymake
@@ -528,7 +529,7 @@ def onpy_srcs(unit, *args):
if py3:
mod_list_md5 = md5()
for path, mod in pys:
- mod_list_md5.update(mod)
+ mod_list_md5.update(six.ensure_binary(mod))
if not (venv and is_extended_source_search_enabled(path, unit)):
dest = 'py/' + mod.replace('.', '/') + '.py'
if with_py:
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index 8864ebd336..fc28c2dc0c 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -359,7 +359,7 @@ def deserialize_list(val):
def get_correct_expression_for_group_var(varname):
- return "\"${join=\;:" + varname + "}\""
+ return r"\"${join=\;:" + varname + "}\""
def count_entries(x):