diff --git a/build/pkgs/asttokens/checksums.ini b/build/pkgs/asttokens/checksums.ini index e69f1ecdfb3..e3759368f21 100644 --- a/build/pkgs/asttokens/checksums.ini +++ b/build/pkgs/asttokens/checksums.ini @@ -1,5 +1,5 @@ tarball=asttokens-VERSION.tar.gz -sha1=cca6058c6c23195148be93bfa32c0a0ca9b2f873 -md5=67b269e359fcb404cd8626985f3676ae -cksum=3749309047 +sha1=eda0bf8bf38ecd475e8358d6ce15968c8679ae86 +md5=a9ae6ae0f85398e511bcb9ec87695eed +cksum=1688343887 upstream_url=https://pypi.io/packages/source/a/asttokens/asttokens-VERSION.tar.gz diff --git a/build/pkgs/asttokens/package-version.txt b/build/pkgs/asttokens/package-version.txt index 7ec1d6db408..c043eea7767 100644 --- a/build/pkgs/asttokens/package-version.txt +++ b/build/pkgs/asttokens/package-version.txt @@ -1 +1 @@ -2.1.0 +2.2.1 diff --git a/build/pkgs/comm/SPKG.rst b/build/pkgs/comm/SPKG.rst new file mode 100644 index 00000000000..6f0ec348582 --- /dev/null +++ b/build/pkgs/comm/SPKG.rst @@ -0,0 +1,18 @@ +comm: Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc. +================================================================================== + +Description +----------- + +Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc. + +License +------- + +BSD 3-Clause License + +Upstream Contact +---------------- + +https://pypi.org/project/comm/ + diff --git a/build/pkgs/comm/checksums.ini b/build/pkgs/comm/checksums.ini new file mode 100644 index 00000000000..a3c7481f090 --- /dev/null +++ b/build/pkgs/comm/checksums.ini @@ -0,0 +1,5 @@ +tarball=comm-VERSION-py3-none-any.whl +sha1=e7e20f9c1524a9fe059c0b6df90a68e1cd2115a9 +md5=165e29c257c70498b61c7a31916727f2 +cksum=2011044045 +upstream_url=https://pypi.io/packages/py3/c/comm/comm-VERSION-py3-none-any.whl diff --git a/build/pkgs/comm/dependencies b/build/pkgs/comm/dependencies new file mode 100644 index 00000000000..0738c2d7777 --- /dev/null +++ b/build/pkgs/comm/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/comm/install-requires.txt b/build/pkgs/comm/install-requires.txt new file mode 100644 index 00000000000..9ba1f1eecf4 --- /dev/null +++ b/build/pkgs/comm/install-requires.txt @@ -0,0 +1 @@ +comm diff --git a/build/pkgs/comm/package-version.txt b/build/pkgs/comm/package-version.txt new file mode 100644 index 00000000000..845639eef26 --- /dev/null +++ b/build/pkgs/comm/package-version.txt @@ -0,0 +1 @@ +0.1.4 diff --git a/build/pkgs/comm/type b/build/pkgs/comm/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/comm/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/ipython/checksums.ini b/build/pkgs/ipython/checksums.ini index a539eb830b4..3b0a8df72dd 100644 --- a/build/pkgs/ipython/checksums.ini +++ b/build/pkgs/ipython/checksums.ini @@ -1,5 +1,5 @@ tarball=ipython-VERSION.tar.gz -sha1=e0dd247f29befed1159d9bdca987d90c2ee0d34a -md5=8c98f6def0622ea32975cb779247c3d7 -cksum=2860792697 +sha1=62afbe2e62e713ee89bfe5303809bdcd2affb2a3 +md5=ac2ff5bad97aa09befdf7f0f27323699 +cksum=413345511 upstream_url=https://pypi.io/packages/source/i/ipython/ipython-VERSION.tar.gz diff --git a/build/pkgs/ipython/install-requires.txt b/build/pkgs/ipython/install-requires.txt index 03d4a4f3413..a52df49c421 100644 --- a/build/pkgs/ipython/install-requires.txt +++ b/build/pkgs/ipython/install-requires.txt @@ -1,2 +1 @@ -ipython >=7.13.0, <8.9.0 -# ipython >= 8.9.0 requires prompt_toolkit too new for Sage +ipython >=7.13.0 diff --git a/build/pkgs/ipython/package-version.txt b/build/pkgs/ipython/package-version.txt index acd405b1d62..86487fdd0f7 100644 --- a/build/pkgs/ipython/package-version.txt +++ b/build/pkgs/ipython/package-version.txt @@ -1 +1 @@ -8.6.0 +8.17.2 diff --git a/build/pkgs/ipywidgets/checksums.ini b/build/pkgs/ipywidgets/checksums.ini index 63a890dcf81..a04080bb509 100644 --- a/build/pkgs/ipywidgets/checksums.ini +++ b/build/pkgs/ipywidgets/checksums.ini @@ -1,5 +1,5 @@ tarball=ipywidgets-VERSION.tar.gz -sha1=b2c8adf4fefc012adfb61e03a2e957bddbbb7597 -md5=c976de164b782eac9e5dfc933e8da295 -cksum=305610881 +sha1=95f7ec13e8ce75e2da40c1789b4af291946a6d99 +md5=2809d1668037606caac588cab329bece +cksum=1839869422 upstream_url=https://pypi.io/packages/source/i/ipywidgets/ipywidgets-VERSION.tar.gz diff --git a/build/pkgs/ipywidgets/dependencies b/build/pkgs/ipywidgets/dependencies index bcb4e030b7d..75467c6fdb0 100644 --- a/build/pkgs/ipywidgets/dependencies +++ b/build/pkgs/ipywidgets/dependencies @@ -1,4 +1,4 @@ - widgetsnbextension jupyterlab_widgets | $(PYTHON_TOOLCHAIN) ipykernel ipython traitlets $(PYTHON) +widgetsnbextension jupyterlab_widgets comm ipykernel ipython traitlets | $(PYTHON_TOOLCHAIN) $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ipywidgets/package-version.txt b/build/pkgs/ipywidgets/package-version.txt index 8b22a322d0f..0e79152459e 100644 --- a/build/pkgs/ipywidgets/package-version.txt +++ b/build/pkgs/ipywidgets/package-version.txt @@ -1 +1 @@ -8.0.2 +8.1.1 diff --git a/build/pkgs/jedi/checksums.ini b/build/pkgs/jedi/checksums.ini index 2db629c8d82..b91b9b187f4 100644 --- a/build/pkgs/jedi/checksums.ini +++ b/build/pkgs/jedi/checksums.ini @@ -1,5 +1,5 @@ tarball=jedi-VERSION.tar.gz -sha1=e94444bd83b55247fd1f3d27d47cc0b148560134 -md5=d8dba4a98a35530f7f5b461c20aff180 -cksum=4093067035 +sha1=8ff91cf4b06cd540108a4c69105770756f831020 +md5=47e89a2b8bedcfeb1527fac37b9ba1b3 +cksum=3224505263 upstream_url=https://pypi.io/packages/source/j/jedi/jedi-VERSION.tar.gz diff --git a/build/pkgs/jedi/package-version.txt b/build/pkgs/jedi/package-version.txt index 249afd517d9..503a21deb47 100644 --- a/build/pkgs/jedi/package-version.txt +++ b/build/pkgs/jedi/package-version.txt @@ -1 +1 @@ -0.18.1 +0.18.2 diff --git a/build/pkgs/prompt_toolkit/checksums.ini b/build/pkgs/prompt_toolkit/checksums.ini index ec0df09c5b9..372a5d3b41c 100644 --- a/build/pkgs/prompt_toolkit/checksums.ini +++ b/build/pkgs/prompt_toolkit/checksums.ini @@ -1,5 +1,5 @@ tarball=prompt_toolkit-VERSION.tar.gz -sha1=77365bfc17ab577d80708a3395186ec68a7dbb2c -md5=214d36301eb139adba280793040d7755 -cksum=3187933391 +sha1=a45022d4b1b3bd827cb2e094de7ce40cc7b05337 +md5=c5e321dd56e1ed8ed95c5fccffb8f3da +cksum=2595783299 upstream_url=https://pypi.io/packages/source/p/prompt_toolkit/prompt_toolkit-VERSION.tar.gz diff --git a/build/pkgs/prompt_toolkit/distros/conda.txt b/build/pkgs/prompt_toolkit/distros/conda.txt index bfb1ed6a874..b99577146cd 100644 --- a/build/pkgs/prompt_toolkit/distros/conda.txt +++ b/build/pkgs/prompt_toolkit/distros/conda.txt @@ -1 +1 @@ -prompt_toolkit>=3.0.5,<3.0.25 +prompt_toolkit>=3.0.38 diff --git a/build/pkgs/prompt_toolkit/install-requires.txt b/build/pkgs/prompt_toolkit/install-requires.txt index 30d49fc8454..e3e1de9a3ea 100644 --- a/build/pkgs/prompt_toolkit/install-requires.txt +++ b/build/pkgs/prompt_toolkit/install-requires.txt @@ -1,2 +1 @@ -# https://github.com/sagemath/sage/issues/33428 - prompt_toolkit 3.0.25+ breaks Ctrl-C -prompt_toolkit >=3.0.5, <3.0.25 +prompt_toolkit >=3.0.38 diff --git a/build/pkgs/prompt_toolkit/package-version.txt b/build/pkgs/prompt_toolkit/package-version.txt index 03a04fce56f..766ca985e2b 100644 --- a/build/pkgs/prompt_toolkit/package-version.txt +++ b/build/pkgs/prompt_toolkit/package-version.txt @@ -1 +1 @@ -3.0.24 +3.0.38 diff --git a/build/pkgs/pygments/checksums.ini b/build/pkgs/pygments/checksums.ini index 14fc1c04cdb..108d39045a2 100644 --- a/build/pkgs/pygments/checksums.ini +++ b/build/pkgs/pygments/checksums.ini @@ -1,5 +1,5 @@ tarball=Pygments-VERSION.tar.gz -sha1=adaf31bf13a7bcc210568537138e0984ecdea626 -md5=6ccae578d28d18968b30a4711652fd9a -cksum=613387624 +sha1=9a2a836e2acfbc2f83c6c40c379d1335c38fa451 +md5=447be4afb076c8325a7dc659aff5b931 +cksum=2352097018 upstream_url=https://pypi.io/packages/source/p/pygments/Pygments-VERSION.tar.gz diff --git a/build/pkgs/pygments/package-version.txt b/build/pkgs/pygments/package-version.txt index fb2c0766b7c..edcfe40d198 100644 --- a/build/pkgs/pygments/package-version.txt +++ b/build/pkgs/pygments/package-version.txt @@ -1 +1 @@ -2.13.0 +2.14.0 diff --git a/build/pkgs/stack_data/checksums.ini b/build/pkgs/stack_data/checksums.ini index 625aaf0578f..b9bc5e8e3e3 100644 --- a/build/pkgs/stack_data/checksums.ini +++ b/build/pkgs/stack_data/checksums.ini @@ -1,5 +1,5 @@ tarball=stack_data-VERSION.tar.gz -sha1=58ed9cb32a42e07dbc18356d06f8db96475bc0f2 -md5=05c8c6c58c02280bc87b6851e40d38e6 -cksum=1485401259 +sha1=71d14defdfc9741bca4aaff049668197f01cd088 +md5=bf86c3c81a0158e1e7f3979da5a0033b +cksum=3302525331 upstream_url=https://pypi.io/packages/source/s/stack_data/stack_data-VERSION.tar.gz diff --git a/build/pkgs/stack_data/package-version.txt b/build/pkgs/stack_data/package-version.txt index ee6cdce3c29..b6160487433 100644 --- a/build/pkgs/stack_data/package-version.txt +++ b/build/pkgs/stack_data/package-version.txt @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/build/pkgs/wcwidth/checksums.ini b/build/pkgs/wcwidth/checksums.ini index e81b55d8053..bca0da44a2c 100644 --- a/build/pkgs/wcwidth/checksums.ini +++ b/build/pkgs/wcwidth/checksums.ini @@ -1,5 +1,5 @@ tarball=wcwidth-VERSION.tar.gz -sha1=3822ed26dc70a4055827bc66cdc21126e51efd66 -md5=a07a75f99d316e14838ac760c831ea37 -cksum=497830371 +sha1=ec98f6ba8ea7c5d2cec9d24d31539d39e2f90d17 +md5=976b997f2ed155b5c2e9a4d50e528d90 +cksum=2272376797 upstream_url=https://pypi.io/packages/source/w/wcwidth/wcwidth-VERSION.tar.gz diff --git a/build/pkgs/wcwidth/package-version.txt b/build/pkgs/wcwidth/package-version.txt index 3a4036fb450..53a75d67355 100644 --- a/build/pkgs/wcwidth/package-version.txt +++ b/build/pkgs/wcwidth/package-version.txt @@ -1 +1 @@ -0.2.5 +0.2.6 diff --git a/src/sage/repl/interpreter.py b/src/sage/repl/interpreter.py index b9a222c12ef..4ddb8aa94a3 100644 --- a/src/sage/repl/interpreter.py +++ b/src/sage/repl/interpreter.py @@ -153,6 +153,18 @@ from IPython.terminal.ipapp import TerminalIPythonApp, IPAppCrashHandler from IPython.core.crashhandler import CrashHandler +from ctypes import pythonapi, c_int, c_void_p +# The following functions are part of the stable ABI since python 3.2 +# See: https://docs.python.org/3/c-api/sys.html#c.PyOS_getsig + +# PyOS_sighandler_t PyOS_getsig(int i) +pythonapi.PyOS_getsig.restype = c_void_p +pythonapi.PyOS_getsig.argtypes = c_int, + +# PyOS_sighandler_t PyOS_setsig(int i, PyOS_sighandler_t h) +pythonapi.PyOS_setsig.restype = c_void_p +pythonapi.PyOS_setsig.argtypes = c_int, c_void_p, + # TODO: This global variable _do_preparse should be associated with an # IPython InteractiveShell as opposed to a global variable in this @@ -287,6 +299,18 @@ def init_display_formatter(self): backend = BackendIPythonCommandline() backend.get_display_manager().switch_backend(backend, shell=self) + def prompt_for_code(self): + # save sigint handlers (python and os level) + # https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1576 + # https://github.com/sagemath/sage/issues/33428 + # https://github.com/sagemath/sage/pull/35251 + import signal + sigint = signal.getsignal(signal.SIGINT) + sigint_os = pythonapi.PyOS_getsig(signal.SIGINT) + text = TerminalInteractiveShell.prompt_for_code(self) + signal.signal(signal.SIGINT, sigint) + pythonapi.PyOS_setsig(signal.SIGINT, sigint_os) + return text class SageTestShell(SageShellOverride, TerminalInteractiveShell): """