diff options
| author | maxim-yurchuk <[email protected]> | 2024-10-09 12:29:46 +0300 |
|---|---|---|
| committer | maxim-yurchuk <[email protected]> | 2024-10-09 13:14:22 +0300 |
| commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
| tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/deprecated/python/win-unicode-console | |
| parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/deprecated/python/win-unicode-console')
| -rw-r--r-- | contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml | 7 | ||||
| -rw-r--r-- | contrib/deprecated/python/win-unicode-console/patches/01-fix-readline.patch | 56 |
2 files changed, 63 insertions, 0 deletions
diff --git a/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml b/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml new file mode 100644 index 00000000000..5398d85094d --- /dev/null +++ b/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml @@ -0,0 +1,7 @@ +requirements: + - library/python/symbols/win_unicode_console +exclude: + - run.py +dos_to_unix: + - win_unicode_console/raw_input.py + - win_unicode_console/readline_hook.py diff --git a/contrib/deprecated/python/win-unicode-console/patches/01-fix-readline.patch b/contrib/deprecated/python/win-unicode-console/patches/01-fix-readline.patch new file mode 100644 index 00000000000..6e955b33b99 --- /dev/null +++ b/contrib/deprecated/python/win-unicode-console/patches/01-fix-readline.patch @@ -0,0 +1,56 @@ +--- contrib/deprecated/python/win-unicode-console/win_unicode_console/__init__.py (index) ++++ contrib/deprecated/python/win-unicode-console/win_unicode_console/__init__.py (working tree) +@@ -1,5 +1,5 @@ + +-from . import streams, console, readline_hook ++from . import streams, console #, readline_hook + from .info import WINDOWS, PY2 + + if PY2: +@@ -14,7 +14,7 @@ def enable( + stdin = Ellipsis, + stdout = Ellipsis, + stderr = Ellipsis, +- use_readline_hook = True, ++ use_readline_hook = False, + use_pyreadline = True, + use_raw_input = True, # PY2 + raw_input__return_unicode = raw_input.RETURN_UNICODE if PY2 else None, +@@ -27,8 +27,8 @@ def enable( + + streams.enable(stdin=stdin, stdout=stdout, stderr=stderr) + +- if use_readline_hook: +- readline_hook.enable(use_pyreadline=use_pyreadline) ++ #if use_readline_hook: ++ # readline_hook.enable(use_pyreadline=use_pyreadline) + + if PY2 and use_raw_input: + raw_input.enable(raw_input__return_unicode) +@@ -50,5 +50,5 @@ def disable(): + unicode_argv.disable() + raw_input.disable() + +- readline_hook.disable() ++ #readline_hook.disable() + streams.disable() +--- contrib/deprecated/python/win-unicode-console/win_unicode_console/readline_hook.py (index) ++++ contrib/deprecated/python/win-unicode-console/win_unicode_console/readline_hook.py (working tree) +@@ -38,7 +38,7 @@ strncpy.argtypes = [c_char_p, c_char_p, c_size_t] + + HOOKFUNC = CFUNCTYPE(c_char_p, c_void_p, c_void_p, c_char_p) + +-PyOS_ReadlineFunctionPointer = c_void_p.in_dll(pythonapi, "PyOS_ReadlineFunctionPointer") ++#PyOS_ReadlineFunctionPointer = c_void_p.in_dll(pythonapi, "PyOS_ReadlineFunctionPointer") + + + def new_zero_terminated_string(b): +@@ -63,7 +63,7 @@ class ReadlineHookManager: + def __init__(self): + self.readline_wrapper_ref = HOOKFUNC(self.readline_wrapper) + self.address = cast(self.readline_wrapper_ref, c_void_p).value +- self.original_address = PyOS_ReadlineFunctionPointer.value ++ #self.original_address = PyOS_ReadlineFunctionPointer.value + self.readline_hook = None + + def readline_wrapper(self, stdin, stdout, prompt): |
