diff options
author | snermolaev <snermolaev@yandex-team.com> | 2025-04-14 06:15:42 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2025-04-14 06:28:07 +0300 |
commit | 76887f61431dc5999139a8d72882449ca1503660 (patch) | |
tree | b43f61cd54ca09511f92e812bc782d2d8c849374 /contrib/tools/python3/Python | |
parent | 8a826652922c8304490262de6bbb69eb1a9b5751 (diff) | |
download | ydb-76887f61431dc5999139a8d72882449ca1503660.tar.gz |
Subinterpretor compatible __res module
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
Diffstat (limited to 'contrib/tools/python3/Python')
-rw-r--r-- | contrib/tools/python3/Python/_warnings.c | 4 | ||||
-rw-r--r-- | contrib/tools/python3/Python/import.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/contrib/tools/python3/Python/_warnings.c b/contrib/tools/python3/Python/_warnings.c index 1f91edbf5cb..f0ab47efb64 100644 --- a/contrib/tools/python3/Python/_warnings.c +++ b/contrib/tools/python3/Python/_warnings.c @@ -791,6 +791,10 @@ is_internal_filename(PyObject *filename) } } + if (_PyUnicode_EqualToASCIIString(filename, "library/python/runtime_py3/__res.py")) { + return true; + } + return false; } diff --git a/contrib/tools/python3/Python/import.c b/contrib/tools/python3/Python/import.c index daac00593d7..1b550d0451c 100644 --- a/contrib/tools/python3/Python/import.c +++ b/contrib/tools/python3/Python/import.c @@ -2523,7 +2523,7 @@ remove_importlib_frames(PyThreadState *tstate) { const char *importlib_filename = "<frozen importlib._bootstrap>"; const char *external_filename = "<frozen importlib._bootstrap_external>"; - const char *importer_filename = "library/python/runtime_py3/importer.pxi"; + const char *importer_filename = "library/python/runtime_py3/__res.py"; const char *remove_frames = "_call_with_frames_removed"; int always_trim = 0; int in_importlib = 0; |