Skip to content

Commit 8dab374

Browse files
author
Release Manager
committed
gh-39616: Fix tests with IPython 9
IPython 9 works fine with Sage at runtime but breaks some tests: - `NoColor` should be lowercase now and throws a warning otherwise https ://github.com/ipython/ipython/commit/a796b952038faa904c5d7e5ea6c068b17e7 65790 - `input_transformer_manager.check_complete` returning two spaces indentation was a bug caused by the `# indirect doctest` tag, which confused the parser. This is fixed in IPython 9, we remove the `# indirect doctest` so the test output is the same for all IPython versions. - Account for some addional verbosity in a couple of tests. URL: #39616 Reported by: Antonio Rojas Reviewer(s): François Bissey, Gonzalo Tornaría
2 parents 276aa66 + 259ce4d commit 8dab374

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=6a3a8b4a86d0190648e544e019839b1865e13fa6
3-
sha256=75113ef3d3ddffb5c671738d040cf84501b9ac12b38036e5443f53f9fd837368
2+
sha1=9743f84f12c5cef218137fc45ee258620ded9fe5
3+
sha256=7b2b9d2fef25fa69918ecb1f5b6eca1fccf22960ce2a235e0baf99d096e625b7
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d72c36f6bbc93f7756e1138cd5659fff5c50fc62
1+
9320452a3de4e261d779f159315c25d3dbe8f57d

src/sage/doctest/forker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ def report_failure(self, out, test, example, got, globs):
14901490
from sage.repl.configuration import sage_ipython_config
14911491
from IPython.terminal.embed import InteractiveShellEmbed
14921492
cfg = sage_ipython_config.default()
1493+
cfg.InteractiveShell.enable_tip = False
14931494
# Currently this doesn't work: prompts only work in pty
14941495
# We keep simple_prompt=True, prompts will be "In [0]:"
14951496
# cfg.InteractiveShell.prompts_class = DebugPrompts

src/sage/repl/ipython_extension.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,13 @@ def init_line_transforms(self):
661661
662662
Check that :issue:`31951` is fixed::
663663
664+
sage: # indirect doctest
664665
sage: from IPython import get_ipython
665666
sage: ip = get_ipython()
666-
sage: ip.input_transformer_manager.check_complete(''' # indirect doctest
667+
sage: ip.input_transformer_manager.check_complete('''
667668
....: for i in [1 .. 2]:
668669
....: a = 2''')
669-
('incomplete', ...)
670+
('incomplete', 4)
670671
sage: ip.input_transformer_manager.check_complete('''
671672
....: def foo(L)
672673
....: K.<a> = L''')

0 commit comments

Comments
 (0)