aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython
diff options
context:
space:
mode:
authorivasenkov15 <ivasenkov15@yandex-team.com>2024-01-23 12:12:09 +0300
committerivasenkov15 <ivasenkov15@yandex-team.com>2024-01-23 12:25:24 +0300
commit4f5160da6ac3805c99917f6448de98460ea8668e (patch)
tree2cf77ab47a1934c8fac76432acc2560d86630566 /contrib/python/ipython
parent0852227e74fca796397668972f80a973c6b3e011 (diff)
downloadydb-4f5160da6ac3805c99917f6448de98460ea8668e.tar.gz
fix bank-applications: remove bank-forms usage
Diffstat (limited to 'contrib/python/ipython')
-rw-r--r--contrib/python/ipython/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/ipython/py3/IPython/core/debugger.py2
-rw-r--r--contrib/python/ipython/py3/IPython/core/interactiveshell.py2
-rw-r--r--contrib/python/ipython/py3/IPython/core/magics/basic.py2
-rw-r--r--contrib/python/ipython/py3/IPython/core/release.py2
-rw-r--r--contrib/python/ipython/py3/IPython/terminal/interactiveshell.py32
-rw-r--r--contrib/python/ipython/py3/IPython/utils/_sysinfo.py2
-rw-r--r--contrib/python/ipython/py3/IPython/utils/text.py4
-rw-r--r--contrib/python/ipython/py3/ya.make2
9 files changed, 31 insertions, 19 deletions
diff --git a/contrib/python/ipython/py3/.dist-info/METADATA b/contrib/python/ipython/py3/.dist-info/METADATA
index ff27b2e371..3a45cc6c3a 100644
--- a/contrib/python/ipython/py3/.dist-info/METADATA
+++ b/contrib/python/ipython/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: ipython
-Version: 8.19.0
+Version: 8.20.0
Summary: IPython: Productive Interactive Computing
Home-page: https://ipython.org
Author: The IPython Development Team
diff --git a/contrib/python/ipython/py3/IPython/core/debugger.py b/contrib/python/ipython/py3/IPython/core/debugger.py
index 389592d066..f370070140 100644
--- a/contrib/python/ipython/py3/IPython/core/debugger.py
+++ b/contrib/python/ipython/py3/IPython/core/debugger.py
@@ -454,7 +454,7 @@ class Pdb(OldPdb):
with self._hold_exceptions(_chained_exceptions):
OldPdb.interaction(self, frame, tb)
else:
- OldPdb.interaction(self, frame, traceback)
+ OldPdb.interaction(self, frame, tb_or_exc)
except KeyboardInterrupt:
self.stdout.write("\n" + self.shell.get_exception_only())
diff --git a/contrib/python/ipython/py3/IPython/core/interactiveshell.py b/contrib/python/ipython/py3/IPython/core/interactiveshell.py
index 1a73571f78..fef5ddc949 100644
--- a/contrib/python/ipython/py3/IPython/core/interactiveshell.py
+++ b/contrib/python/ipython/py3/IPython/core/interactiveshell.py
@@ -3604,7 +3604,7 @@ class InteractiveShell(SingletonConfigurable):
# Things related to GUI support and pylab
#-------------------------------------------------------------------------
- active_eventloop = None
+ active_eventloop: Optional[str] = None
def enable_gui(self, gui=None):
raise NotImplementedError('Implement enable_gui in a subclass')
diff --git a/contrib/python/ipython/py3/IPython/core/magics/basic.py b/contrib/python/ipython/py3/IPython/core/magics/basic.py
index 865e760eb1..3ac4049614 100644
--- a/contrib/python/ipython/py3/IPython/core/magics/basic.py
+++ b/contrib/python/ipython/py3/IPython/core/magics/basic.py
@@ -124,7 +124,7 @@ class BasicMagics(Magics):
In [6]: %whereami
Out[6]: '/home/testuser'
- In [7]: %alias_magic h history "-p -l 30" --line
+ In [7]: %alias_magic h history -p "-l 30" --line
Created `%h` as an alias for `%history -l 30`.
"""
diff --git a/contrib/python/ipython/py3/IPython/core/release.py b/contrib/python/ipython/py3/IPython/core/release.py
index 70d5a675a3..ec50c45721 100644
--- a/contrib/python/ipython/py3/IPython/core/release.py
+++ b/contrib/python/ipython/py3/IPython/core/release.py
@@ -16,7 +16,7 @@
# release. 'dev' as a _version_extra string means this is a development
# version
_version_major = 8
-_version_minor = 19
+_version_minor = 20
_version_patch = 0
_version_extra = ".dev"
# _version_extra = "rc1"
diff --git a/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py b/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py
index 532287f5e7..fcb816eb17 100644
--- a/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py
+++ b/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py
@@ -1,8 +1,8 @@
"""IPython terminal interface using prompt_toolkit"""
-import asyncio
import os
import sys
+import inspect
from warnings import warn
from typing import Union as UnionType, Optional
@@ -66,8 +66,8 @@ from .shortcuts.auto_suggest import (
PTK3 = ptk_version.startswith('3.')
-class _NoStyle(Style): pass
-
+class _NoStyle(Style):
+ pass
_style_overrides_light_bg = {
@@ -84,6 +84,20 @@ _style_overrides_linux = {
Token.OutPromptNum: '#ansired bold',
}
+
+def _backward_compat_continuation_prompt_tokens(method, width: int, *, lineno: int):
+ """
+ Sagemath use custom prompt and we broke them in 8.19.
+ """
+ sig = inspect.signature(method)
+ if "lineno" in inspect.signature(method).parameters or any(
+ [p.kind == p.VAR_KEYWORD for p in sig.parameters.values()]
+ ):
+ return method(width, lineno=lineno)
+ else:
+ return method(width)
+
+
def get_default_editor():
try:
return os.environ['EDITOR']
@@ -96,7 +110,8 @@ def get_default_editor():
if os.name == 'posix':
return 'vi' # the only one guaranteed to be there!
else:
- return 'notepad' # same in Windows!
+ return "notepad" # same in Windows!
+
# conservatively check for tty
# overridden streams can result in things like:
@@ -293,7 +308,6 @@ class TerminalInteractiveShell(InteractiveShell):
return self.editing_mode
-
@observe('editing_mode')
def _editing_mode(self, change):
if self.pt_app:
@@ -322,7 +336,6 @@ class TerminalInteractiveShell(InteractiveShell):
def refresh_style(self):
self._style = self._make_style_from_name_or_cls(self.highlighting_style)
-
highlighting_style_overrides = Dict(
help="Override highlighting format for specific tokens"
).tag(config=True)
@@ -764,7 +777,9 @@ class TerminalInteractiveShell(InteractiveShell):
"message": get_message,
"prompt_continuation": (
lambda width, lineno, is_soft_wrap: PygmentsTokens(
- self.prompts.continuation_prompt_tokens(width, lineno=lineno)
+ _backward_compat_continuation_prompt_tokens(
+ self.prompts.continuation_prompt_tokens, width, lineno=lineno
+ )
)
),
"multiline": True,
@@ -859,7 +874,6 @@ class TerminalInteractiveShell(InteractiveShell):
for cmd in ('clear', 'more', 'less', 'man'):
self.alias_manager.soft_define_alias(cmd, cmd)
-
def __init__(self, *args, **kwargs) -> None:
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
self._set_autosuggestions(self.autosuggestions_provider)
@@ -868,7 +882,6 @@ class TerminalInteractiveShell(InteractiveShell):
self.keep_running = True
self._set_formatter(self.autoformatter)
-
def ask_exit(self):
self.keep_running = False
@@ -916,7 +929,6 @@ class TerminalInteractiveShell(InteractiveShell):
self._atexit_once()
-
_inputhook = None
def inputhook(self, context):
if self._inputhook is not None:
diff --git a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
index 02820dc9c1..461aae5256 100644
--- a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
+++ b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
@@ -1,2 +1,2 @@
# GENERATED BY setup.py
-commit = "dc4369111"
+commit = "19f24dd8e"
diff --git a/contrib/python/ipython/py3/IPython/utils/text.py b/contrib/python/ipython/py3/IPython/utils/text.py
index 9b653dcee0..8f73dca28a 100644
--- a/contrib/python/ipython/py3/IPython/utils/text.py
+++ b/contrib/python/ipython/py3/IPython/utils/text.py
@@ -17,7 +17,7 @@ import warnings
from string import Formatter
from pathlib import Path
-from typing import List, Union, Optional, Dict, Tuple
+from typing import List, Dict, Tuple
class LSString(str):
@@ -357,7 +357,7 @@ def format_screen(strng):
return strng
-def dedent(text):
+def dedent(text: str) -> str:
"""Equivalent of textwrap.dedent that ignores unindented first line.
This means it will still dedent strings like:
diff --git a/contrib/python/ipython/py3/ya.make b/contrib/python/ipython/py3/ya.make
index e6f0887b76..c61c19b4b8 100644
--- a/contrib/python/ipython/py3/ya.make
+++ b/contrib/python/ipython/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(8.19.0)
+VERSION(8.20.0)
LICENSE(BSD-3-Clause)