diff options
author | spreis <spreis@yandex-team.com> | 2025-05-12 07:01:03 +0300 |
---|---|---|
committer | spreis <spreis@yandex-team.com> | 2025-05-12 07:16:05 +0300 |
commit | fe512fa85146df9204580c7279f09b81bf141953 (patch) | |
tree | 1ade779eda9ce666dc394f73d1a3ddf24e07bd74 /contrib/tools/python3/src/Python/sysmodule.c | |
parent | d94630d2ef412433360d582e7d941ff9aa96d2e8 (diff) | |
download | ydb-fe512fa85146df9204580c7279f09b81bf141953.tar.gz |
Switch default python version for PROGRAM/LIBRARY
This also
- prohibits Python macros (PY_SRCS, PY_REGISTER and PY_MAIN) without explicit Python version
- Allows PY_SRCE for PROTO_LIBRARY by ingnoring it in all submodules except PY2_PROTO/PY3_PROTO
Known caveats:
- LIBRARY/PROGRAM still have implicit default (Python3 starting this PR), so Python version mismatches are still possible on pure C/C++ code depending on Python.
- `PY_ANY_MODULE` also switched default, but it's better to require explicit version specification somehow.
- `ALL_PY_SRCS` unlike `PY_SRCS` is not enabled in `PROTO_LIBRARY` and will produce issue of "Unknown python version". `IF (PY2_PROTO OR PY3_PROTO)` is required around such macro to be used. There is only 1 such case in Arcadia and it looks completely weird to me.
- `PYTHON_TYPE_FOR_CYTHON` is now aligned with `PYTHONx_MODULE` module, so all explicit uses are to be removed. Most probably this should be completely removed in favor of `_PYTHON_VER`, but this requires prohibition of PY_ANY_MODULE w/o version and deeper investigation on what `PYTHON_TYPE_FOR_CYTHON` actually is.
commit_hash:e6b809da1352c05e708e070a059306c19d49b53a
Diffstat (limited to 'contrib/tools/python3/src/Python/sysmodule.c')
0 files changed, 0 insertions, 0 deletions