<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/python/runtime_py3, branch oidc-1.2.5-dev</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=oidc-1.2.5-dev</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=oidc-1.2.5-dev'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2025-04-29T03:57:18Z</updated>
<entry>
<title>Subinterpretor compatible __res module (2nd attempt)</title>
<updated>2025-04-29T03:57:18Z</updated>
<author>
<name>snermolaev</name>
<email>snermolaev@yandex-team.com</email>
</author>
<published>2025-04-29T03:44:21Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=713adc6a88be8af8a342a9a72a055b7ef6514563'/>
<id>urn:sha1:713adc6a88be8af8a342a9a72a055b7ef6514563</id>
<content type='text'>
Cython is not yet subinterpreter compatible. There are no ETA when cython is going to support subinterpreters.

This PR removes cython from hermetic python imoprt hooks in order to make them subinterpretr-compatible.
commit_hash:427b6f9db6afa6695659ee147621e1ccb391d3cb
</content>
</entry>
<entry>
<title>Revert "Subinterpretor compatible __res module" rXXXXXX</title>
<updated>2025-04-15T05:21:15Z</updated>
<author>
<name>snermolaev</name>
<email>snermolaev@yandex-team.com</email>
</author>
<published>2025-04-15T05:08:40Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=0ca7cfb39890921e0fc5a77e2972842717989f96'/>
<id>urn:sha1:0ca7cfb39890921e0fc5a77e2972842717989f96</id>
<content type='text'>
commit_hash:1d9f5675b9d3ddaa44db4472376a06ad3e811e2d
</content>
</entry>
<entry>
<title>Subinterpretor compatible __res module</title>
<updated>2025-04-14T03:28:07Z</updated>
<author>
<name>snermolaev</name>
<email>snermolaev@yandex-team.com</email>
</author>
<published>2025-04-14T03:15:42Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=76887f61431dc5999139a8d72882449ca1503660'/>
<id>urn:sha1:76887f61431dc5999139a8d72882449ca1503660</id>
<content type='text'>
Cython is not yet subinterpreter compatible. There are no ETA when cython is going to support subinterpreters.

This PR removes cython from hermetic python imoprt hooks in order to make them subinterpretr-compatible.
commit_hash:1b067c37f55a4f1d9a6172df7009c75231cc1e25
</content>
</entry>
<entry>
<title>[library/python/runtime_py3/importer.pxi] Support trailing newline in root.path files</title>
<updated>2025-03-19T08:04:10Z</updated>
<author>
<name>prettyboy</name>
<email>prettyboy@yandex-team.com</email>
</author>
<published>2025-03-19T07:41:02Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=c616b6639fc99067edbe32b7b6c8d34bacecf114'/>
<id>urn:sha1:c616b6639fc99067edbe32b7b6c8d34bacecf114</id>
<content type='text'>
Для того чтобы работал сценарий
```
echo `arc root` &gt; /tmp/.root.path
```
commit_hash:255b16f66c1a610cea5322a3842edc492634faaf
</content>
</entry>
<entry>
<title>fix arcadia py3 runtime for win due to encoding</title>
<updated>2025-02-28T08:56:32Z</updated>
<author>
<name>kuzmich321</name>
<email>kuzmich321@yandex-team.com</email>
</author>
<published>2025-02-28T07:50:51Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=6a9a436309f31f967622304be9fb9f793b38e9cf'/>
<id>urn:sha1:6a9a436309f31f967622304be9fb9f793b38e9cf</id>
<content type='text'>
[Вот так](HIDDEN_URL делает нативный питон

[Репродьюсер](HIDDEN_URL

Как оно выглядит [ДО](HIDDEN_URL и [ПОСЛЕ](HIDDEN_URL, а вот так [нативный](HIDDEN_URL
commit_hash:cdce69c28e699d42f25e43f5d6efb214c8227024
</content>
</entry>
<entry>
<title>Add `stem` property</title>
<updated>2025-02-02T07:26:54Z</updated>
<author>
<name>shadchin</name>
<email>shadchin@yandex-team.com</email>
</author>
<published>2025-02-02T07:11:20Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d5cb068a0b1e8633e07cb646a1b4e8423b9afadd'/>
<id>urn:sha1:d5cb068a0b1e8633e07cb646a1b4e8423b9afadd</id>
<content type='text'>
commit_hash:ee709cc1095985919972e31b34d0127eb322959f
</content>
</entry>
<entry>
<title>[library/python/runtime_py3] Made Y_PYTHON_SOURCE_ROOT bytes again</title>
<updated>2025-01-23T12:32:48Z</updated>
<author>
<name>prettyboy</name>
<email>prettyboy@yandex-team.com</email>
</author>
<published>2025-01-23T12:11:11Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=e69661d981b700bc41768a57b472b08817afdf04'/>
<id>urn:sha1:e69661d981b700bc41768a57b472b08817afdf04</id>
<content type='text'>
commit_hash:3433c11c4d386c785422b1e149e9a3a8de7f4f0f
</content>
</entry>
<entry>
<title>[devtools/ya] Dont' write __pycache__ to the arcadia in external-py-files mode</title>
<updated>2025-01-23T09:50:38Z</updated>
<author>
<name>prettyboy</name>
<email>prettyboy@yandex-team.com</email>
</author>
<published>2025-01-23T09:01:53Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=6d7132e53353b6fe47a3ded23561e26e1d1745e1'/>
<id>urn:sha1:6d7132e53353b6fe47a3ded23561e26e1d1745e1</id>
<content type='text'>
В репозитории больше не будет `__pycache__` при запусках через ya make / test

На примере devtools/ya/handlers/analyze_make/tests
Время конфигурации в горячем сценарии в режиме --ext-py при изменении одного питонфайлика: `Configure time - 6.1 s`
Время конфигурации в горячем сценарии в режиме --ext-py при изменении одного питонфайлика с текущими правками: `Configure time - 4.6 s`
commit_hash:adf5219cd4f347bb572393d4a6debd1436dc0815
</content>
</entry>
<entry>
<title>[library/python/runtime_py3] Added bytecode support for external-py-files mode</title>
<updated>2025-01-17T22:13:15Z</updated>
<author>
<name>prettyboy</name>
<email>prettyboy@yandex-team.com</email>
</author>
<published>2025-01-17T21:52:04Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=29c54233d8257efabcec7fd41d359d826a1bf610'/>
<id>urn:sha1:29c54233d8257efabcec7fd41d359d826a1bf610</id>
<content type='text'>
Добавляется поддержка стандартной работы с байткодом для бинарей собранных с --ext-py (HIDDEN_URL

На примере импорт теста для `devtools/ya/bin`
`time Y_PYTHON_ENTRY_POINT=library.python.testing.import_test.import_test:main YA_TEST_CONTEXT_FILE=/tmp/test.context ./ya-bin &gt;/dev/null`

#|
||
Без патча ya m -r
|
real    0m2,934s
user    0m2,772s
sys     0m0,157s
||
||
Без патча
ya m -r --ext-py
|
real    0m10,916s
user    0m9,927s
sys     0m0,368s
||
||
C патчем
ya m -r
|
real    0m2,931s
user    0m2,774s
sys     0m0,156s
||
||
C патчем
ya m -r --ext-py
первый запуск с записью байткода
|
real    0m7,482s
user    0m5,174s
sys     0m0,620s
||
||
C патчем
ya m -r --ext-py
последующие запуски с использованием байткода с фс
|
real    0m3,550s
user    0m2,801s
sys     0m0,262s
||
|#
commit_hash:84f7bb273b09d51b88eb5c5b6dfcd3bb7c108307
</content>
</entry>
<entry>
<title>Prototype - external python files mode for tests</title>
<updated>2025-01-16T19:26:51Z</updated>
<author>
<name>prettyboy</name>
<email>prettyboy@yandex-team.com</email>
</author>
<published>2025-01-16T18:01:45Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=2f3fd95aac24e27a3b0aa2badda49db82bf36cc5'/>
<id>urn:sha1:2f3fd95aac24e27a3b0aa2badda49db82bf36cc5</id>
<content type='text'>
Режим позволяет перезапускать python тесты или интеграционные тесты на питон программы при внесении изменений в python файлы без перекомпиляции.

Сценарий:
- прогнали тесты
- внесли изменение в `library/python/func/__init__.py`
- перезапустили, смотрим на времена

На примере интеграционного devtools/ya/handlers/analyze_make/tests в codenv (base конфигурация).

#|
||
ya m -rA
|
ya m -rA --ext-py
||
||
real    10m25,928s
user    0m53,465s
sys     1m14,791s

```
Total time by type:
[935171 ms] [LD] [count: 3, ave time 311723.67 msec]
[ 13657 ms] [prepare:AC] [count: 4, ave time 3414.25 msec]
[ 10436 ms] [TM] [count: 1, ave time 10436.00 msec]
[ 10387 ms] [prepare:get from local cache] [count: 1521, ave time 6.83 msec]
[  6480 ms] [TS] [count: 1, ave time 6480.00 msec]
[  3823 ms] [prepare:put into local cache, clean build dir] [count: 7, ave time 546.14 msec]
[  2279 ms] [CC] [count: 1, ave time 2279.00 msec]
[  1251 ms] [PY] [count: 1, ave time 1251.00 msec]
[   372 ms] [prepare:yt-store] [count: 2, ave time 186.00 msec]
[   154 ms] [AR] [count: 1, ave time 154.00 msec]
...
```

|

real    0m22,094s
user    0m26,372s
sys     0m3,363s

```
Total time by type:
[13140 ms] [TM] [count: 1, ave time 13140.00 msec]
[  351 ms] [prepare:yt-store] [count: 1, ave time 351.00 msec]
[   81 ms] [prepare:tools] [count: 8, ave time 10.12 msec]
[   32 ms] [prepare:AC] [count: 2, ave time 16.00 msec]
[   31 ms] [prepare:get from local cache] [count: 7, ave time 4.43 msec]
[   16 ms] [prepare:clean] [count: 3, ave time 5.33 msec]
```

||
|#

В codenv в base конфигуарции (4cpu) невероятно долго идёт линковка. Тот же самый сценарий, но на mous (54cpu)

#|
||
ya m -rA
|
ya m -rA --ext-py
||
||

real    0m25,435s
user    0m40,242s
sys     0m22,434s

```
Total time by type:
[30958 ms] [prepare:get from local cache] [count: 1521, ave time 20.35 msec]
[16293 ms] [prepare:AC] [count: 4, ave time 4073.25 msec]
[11161 ms] [LD] [count: 3, ave time 3720.33 msec]
[ 4256 ms] [TM] [count: 1, ave time 4256.00 msec]
[ 3529 ms] [TS] [count: 1, ave time 3529.00 msec]
[ 1542 ms] [CC] [count: 1, ave time 1542.00 msec]
[  635 ms] [PY] [count: 1, ave time 635.00 msec]
...
```

|

real    0m18,321s
user    0m21,673s
sys     0m3,204s

```
Total time by type:
[10786 ms] [TM] [count: 1, ave time 10786.00 msec]
[ 1568 ms] [prepare:yt-store] [count: 1, ave time 1568.00 msec]
[  151 ms] [prepare:tools] [count: 8, ave time 18.88 msec]
[   61 ms] [prepare:get from local cache] [count: 7, ave time 8.71 msec]
[   48 ms] [prepare:AC] [count: 2, ave time 24.00 msec]
[   14 ms] [prepare:clean] [count: 3, ave time 4.67 msec]
```

||
|#

В новом режиме тест ожидаемо замедляется, так как все питон программы при каждом старте вынуждены читать файлы с фс (ещё через арк), а потом ещё и компилировать байткод, т.е. холодный запуск
commit_hash:24c5a46a8385d3c065abfb6fc5b40f7ad24bb1cb
</content>
</entry>
</feed>
