diff options
author | spreis <spreis@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
commit | b49848d6e361b76904f094b7d5e10d6edea75afe (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/python/runtime_py3 | |
parent | bcd1126cbd5d445cd0665d295198aa39c6ab8cbe (diff) | |
download | ydb-b49848d6e361b76904f094b7d5e10d6edea75afe.tar.gz |
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/runtime_py3')
-rw-r--r-- | library/python/runtime_py3/importer.pxi | 20 | ||||
-rw-r--r-- | library/python/runtime_py3/ya.make | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/library/python/runtime_py3/importer.pxi b/library/python/runtime_py3/importer.pxi index fd0d286fda..904f94dea2 100644 --- a/library/python/runtime_py3/importer.pxi +++ b/library/python/runtime_py3/importer.pxi @@ -110,8 +110,8 @@ def iter_py_modules(with_keys=False): yield key, mod else: yield mod - - + + def iter_prefixes(s): i = s.find('.') while i >= 0: @@ -119,7 +119,7 @@ def iter_prefixes(s): i = s.find('.', i + 1) -def resfs_resolve(path): +def resfs_resolve(path): """ Return the absolute path of a root-relative path if it exists. """ @@ -140,7 +140,7 @@ def resfs_src(key, resfs_file=False): return __resource.find(b'resfs/src/' + _b(key)) -def resfs_read(path, builtin=None): +def resfs_read(path, builtin=None): """ Return the bytes of the resource file at path, or None. If builtin is True, do not look for it on the filesystem. @@ -165,11 +165,11 @@ def resfs_files(prefix=b''): def mod_path(mod): - """ + """ Return the resfs path to the source code of the module with the given name. - """ + """ return py_prefix + _b(mod).replace(b'.', b'/') + b'.py' - + class ResourceImporter(object): @@ -279,12 +279,12 @@ class ResourceImporter(object): data = file_bytes(abspath) return compile(data, _s(abspath), 'exec', dont_inherit=True) - yapyc_path = path + b'.yapyc3' - yapyc_data = resfs_read(yapyc_path, builtin=True) + yapyc_path = path + b'.yapyc3' + yapyc_data = resfs_read(yapyc_path, builtin=True) if yapyc_data: return marshal.loads(yapyc_data) else: - py_data = resfs_read(path, builtin=True) + py_data = resfs_read(path, builtin=True) if py_data: return compile(py_data, _s(relpath), 'exec', dont_inherit=True) else: diff --git a/library/python/runtime_py3/ya.make b/library/python/runtime_py3/ya.make index a3b8a8b4d1..fa5c11341a 100644 --- a/library/python/runtime_py3/ya.make +++ b/library/python/runtime_py3/ya.make @@ -1,4 +1,4 @@ -PY3_LIBRARY() +PY3_LIBRARY() OWNER( borman @@ -20,7 +20,7 @@ NO_PYTHON_INCLUDES() ENABLE(PYBUILD_NO_PYC) -PY_SRCS( +PY_SRCS( entry_points.py TOP_LEVEL |