Skip to content

Test failures with Python 3.14 alpha 6 #14858

Closed

Description

@frenzymadness

We've started building and testing ipython with Python 3.14 alpha 6 and there are some test failures:


_____________ ERROR at teardown of TestAstTransform2.test_run_cell _____________

self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_run_cell>

    def tearDown(self):
>       ip.ast_transformers.remove(self.intwrapper)
E       ValueError: list.remove(x): x not in list

core/tests/test_interactiveshell.py:850: ValueError


______________ ERROR at teardown of TestAstTransform2.test_timeit ______________

self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_timeit>

    def tearDown(self):
>       ip.ast_transformers.remove(self.intwrapper)
E       ValueError: list.remove(x): x not in list

core/tests/test_interactiveshell.py:850: ValueError


_________________________ AsyncTest.test_memory_error __________________________

self = <IPython.core.tests.test_async_helpers.AsyncTest testMethod=test_memory_error>

    def test_memory_error(self):
        """
        The pgen parser in 3.8 or before use to raise MemoryError on too many
        nested parens anymore"""
    
>       iprc("(" * 200 + ")" * 200)

core/tests/test_async_helpers.py:289: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
core/tests/test_async_helpers.py:23: in iprc
    return ip.run_cell(dedent(x)).raise_error()
core/interactiveshell.py:306: in raise_error
    raise self.error_before_exec
core/interactiveshell.py:3308: in run_cell_async
    code_ast = compiler.ast_parse(cell, filename=cell_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <IPython.core.compilerop.CachingCompiler object at 0x7fa2687d1940>
source = '(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\n'
filename = '<ipython-input-1-ab69bc0f135a>', symbol = 'exec'

    def ast_parse(self, source, filename='<unknown>', symbol='exec'):
        """Parse code to an AST with the current compiler flags active.
    
        Arguments are exactly the same as ast.parse (in the standard library),
        and are passed to the built-in compile function."""
>       return compile(source, filename, symbol, self.flags | PyCF_ONLY_AST, 1)
E       MemoryError: Parser stack overflowed - Python source too complex to parse

core/compilerop.py:86: MemoryError
----------------------------- Captured stdout call -----------------------------
MemoryError: Parser stack overflowed - Python source too complex to parse
______________________________ test_unicode_range ______________________________

    def test_unicode_range():
        """
        Test that the ranges we test for unicode names give the same number of
        results than testing the full length.
        """
    
        expected_list = _unicode_name_compute([(0, 0x110000)])
        test = _unicode_name_compute(_UNICODE_RANGES)
        len_exp = len(expected_list)
        len_test = len(test)
    
        # do not inline the len() or on error pytest will try to print the 130 000 +
        # elements.
        message = None
        if len_exp != len_test or len_exp > 131808:
            size, start, stop, prct = recompute_unicode_ranges()
            message = f"""_UNICODE_RANGES likely wrong and need updating. This is
            likely due to a new release of Python. We've find that the biggest gap
            in unicode characters has reduces in size to be {size} characters
            ({prct}), from {start}, to {stop}. In completer.py likely update to
    
                _UNICODE_RANGES = [(32, {start}), ({stop}, 0xe01f0)]
    
            And update the assertion below to use
    
                len_exp <= {len_exp}
            """
        assert len_exp == len_test, message
    
        # fail if new unicode symbols have been added.
>       assert len_exp <= 143668, message
E       AssertionError: _UNICODE_RANGES likely wrong and need updating. This is
E                 likely due to a new release of Python. We've find that the biggest gap
E                 in unicode characters has reduces in size to be 711762 characters
E                 (78%), from 0x323b0, to 0xe0001. In completer.py likely update to
E         
E                     _UNICODE_RANGES = [(32, 0x323b0), (0xe0001, 0xe01f0)]
E         
E                 And update the assertion below to use
E         
E                     len_exp <= 148853
E                 
E       assert 148853 <= 143668

core/tests/test_completer.py:129: AssertionError
_______________________ test_interruptible_core_debugger _______________________

self = <IPython.core.debugger.InterruptiblePdb object at 0x7fa2643c5550>
context = 0

    def print_stack_trace(self, context=None):
        Colors = self.color_scheme_table.active_colors
        ColorsNormal = Colors.Normal
        if context is None:
            context = self.context
        try:
            context = int(context)
            if context <= 0:
>               raise ValueError("Context must be a positive integer")
E               ValueError: Context must be a positive integer

core/debugger.py:496: ValueError

The above exception was the direct cause of the following exception:

    def test_interruptible_core_debugger():
        """The debugger can be interrupted.
    
        The presumption is there is some mechanism that causes a KeyboardInterrupt
        (this is implemented in ipykernel).  We want to ensure the
        KeyboardInterrupt cause debugging to cease.
        """
        def raising_input(msg="", called=[0]):
            called[0] += 1
            assert called[0] == 1, "input() should only be called once!"
            raise KeyboardInterrupt()
    
        tracer_orig = sys.gettrace()
        try:
            with patch.object(builtins, "input", raising_input):
>               debugger.InterruptiblePdb().set_trace()

core/tests/test_debugger.py:235: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.14/bdb.py:118: in trace_dispatch
    return self.dispatch_opcode(frame, arg)
/usr/lib64/python3.14/bdb.py:223: in dispatch_opcode
    self.user_opcode(frame)
/usr/lib64/python3.14/pdb.py:460: in user_line
    self.interaction(frame, None)
core/debugger.py:466: in interaction
    OldPdb.interaction(self, frame, tb_or_exc)
/usr/lib64/python3.14/pdb.py:640: in interaction
    self._cmdloop()
core/debugger.py:1119: in _cmdloop
    self.cmdloop()
core/debugger.py:1105: in cmdloop
    return OldPdb.cmdloop(self, intro=intro)
/usr/lib64/python3.14/cmd.py:149: in cmdloop
    stop = self.onecmd(line)
/usr/lib64/python3.14/pdb.py:878: in onecmd
    return getattr(self, command)(arg)
/usr/lib64/python3.14/pdb.py:1035: in _pdbcmd_print_frame_status
    self.print_stack_trace(0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <IPython.core.debugger.InterruptiblePdb object at 0x7fa2643c5550>
context = 0

    def print_stack_trace(self, context=None):
        Colors = self.color_scheme_table.active_colors
        ColorsNormal = Colors.Normal
        if context is None:
            context = self.context
        try:
            context = int(context)
            if context <= 0:
                raise ValueError("Context must be a positive integer")
        except (TypeError, ValueError) as e:
>               raise ValueError("Context must be a positive integer") from e
E               ValueError: Context must be a positive integer

core/debugger.py:498: ValueError
_______________________________ test_xmode_skip ________________________________

    @skip_win32
    def test_xmode_skip():
        """that xmode skip frames
    
        Not as a doctest as pytest does not run doctests.
        """
        import pexpect
        env = os.environ.copy()
        env["IPY_TEST_SIMPLE_PROMPT"] = "1"
    
        child = pexpect.spawn(
            sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env
        )
        child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
    
        child.expect("IPython")
        child.expect("\n")
        child.expect_exact("In [1]")
    
        block = dedent(
            """
        def f():
            __tracebackhide__ = True
            g()
    
        def g():
            raise ValueError
    
        f()
        """
        )
    
        for line in block.splitlines():
            child.sendline(line)
            child.expect_exact(line)
        child.expect_exact("skipping")
    
        block = dedent(
            """
        def f():
            __tracebackhide__ = True
            g()
    
        def g():
            from IPython.core.debugger import set_trace
            set_trace()
    
        f()
        """
        )
    
        for line in block.splitlines():
            child.sendline(line)
            child.expect_exact(line)
    
>       child.expect("ipdb>")

core/tests/test_debugger.py:301: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
    return self.expect_list(compiled_pattern_list,
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
/usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x7fa266cd4850>
err = TIMEOUT('Timeout exceeded.')

    def timeout(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg
    
            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
E           <pexpect.pty_spawn.spawn object at 0x7fa2643c6a50>
E           command: /usr/bin/python3
E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor']
E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [7]: '
E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [7]: '
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 4339
E           child_fd: 17
E           closed: False
E           timeout: 60.0
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: None
E           logfile_read: None
E           logfile_send: None
E           maxread: 2000
E           ignorecase: False
E           searchwindowsize: None
E           delaybeforesend: 0.05
E           delayafterclose: 0.1
E           delayafterterminate: 0.1
E           searcher: searcher_re:
E               0: re.compile(b'ipdb>')

/usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
____________________________ test_where_erase_value ____________________________

    @skip_win32
    def test_where_erase_value():
        """Test that `where` does not access f_locals and erase values."""
        import pexpect
    
        env = os.environ.copy()
        env["IPY_TEST_SIMPLE_PROMPT"] = "1"
    
        child = pexpect.spawn(
            sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env
        )
        child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
    
        child.expect("IPython")
        child.expect("\n")
        child.expect_exact("In [1]")
    
        block = dedent(
            """
        def simple_f():
             myvar = 1
             print(myvar)
             1/0
             print(myvar)
        simple_f()    """
        )
    
        for line in block.splitlines():
            child.sendline(line)
            child.expect_exact(line)
        child.expect_exact("ZeroDivisionError")
        child.expect_exact("In [2]:")
    
        child.sendline("%debug")
    
        ##
>       child.expect("ipdb>")

core/tests/test_debugger.py:564: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
    return self.expect_list(compiled_pattern_list,
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
/usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x7fa26521d160>
err = TIMEOUT('Timeout exceeded.')

    def timeout(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg
    
            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
E           <pexpect.pty_spawn.spawn object at 0x7fa264e19450>
E           command: /usr/bin/python3
E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor']
E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [3]: '
E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [3]: '
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 4341
E           child_fd: 18
E           closed: False
E           timeout: 60.0
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: None
E           logfile_read: None
E           logfile_send: None
E           maxread: 2000
E           ignorecase: False
E           searchwindowsize: None
E           delaybeforesend: 0.05
E           delayafterclose: 0.1
E           delayafterterminate: 0.1
E           searcher: searcher_re:
E               0: re.compile(b'ipdb>')

/usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
_______________________ TestAstTransform2.test_run_cell ________________________

self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_run_cell>

    def test_run_cell(self):
        ip.run_cell("n = 2")
>       self.assertEqual(self.calls, [(2,)])
E       AssertionError: Lists differ: [] != [(2,)]
E       
E       Second list contains 1 additional elements.
E       First extra element 0:
E       (2,)
E       
E       - []
E       + [(2,)]

core/tests/test_interactiveshell.py:855: AssertionError
________________________ TestAstTransform2.test_timeit _________________________

self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_timeit>

    def test_timeit(self):
        called = set()
        def f(x):
            called.add(x)
        ip.push({'f':f})
    
        with tt.AssertPrints("std. dev. of"):
            ip.run_line_magic("timeit", "-n1 f(1)")
>       self.assertEqual(called, {(1,)})
E       AssertionError: Items in the first set but not the second:
E       1
E       Items in the second set but not the first:
E       (1,)

core/tests/test_interactiveshell.py:873: AssertionError
__________________________ test_render_signature_long __________________________

    def test_render_signature_long():
        from typing import Optional
    
        def long_function(
            a_really_long_parameter: int,
            and_another_long_one: bool = False,
            let_us_make_sure_this_is_looong: Optional[str] = None,
        ) -> bool: pass
    
        sig = oinspect._render_signature(
            signature(long_function),
            long_function.__name__,
        )
        expected = """\
    long_function(
        a_really_long_parameter: int,
        and_another_long_one: bool = False,
        let_us_make_sure_this_is_looong: Optional[str] = None,
    ) -> bool\
    """
    
>       assert sig == expected
E       AssertionError: assert 'long_functio...e,\n) -> bool' == 'long_functio...e,\n) -> bool'
E         
E         Skipping 116 identical leading characters in diff, use -v to show
E         - s_looong: Optional[str] = None,
E         + s_looong: str | None = None,
E           ) -> bool

core/tests/test_oinspect.py:589: AssertionError
__________________ test_debug_magic_passes_through_generators __________________

    @skip_win32
    def test_debug_magic_passes_through_generators():
        """
        This test that we can correctly pass through frames of a generator post-mortem.
        """
        import pexpect
        import re
        in_prompt = re.compile(br'In ?\[\d+\]:')
        ipdb_prompt = 'ipdb>'
        env = os.environ.copy()
        child = pexpect.spawn(sys.executable, ['-m', 'IPython', '--colors=nocolor', '--simple-prompt'],
                              env=env)
        child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
    
        child.expect(in_prompt)
    
        child.timeout = 2 * IPYTHON_TESTING_TIMEOUT_SCALE
    
        child.sendline("def f(x):")
        child.sendline("    raise Exception")
        child.sendline("")
    
        child.expect(in_prompt)
        child.sendline("gen = (f(x) for x in [0])")
        child.sendline("")
    
        child.expect(in_prompt)
        child.sendline("for x in gen:")
        child.sendline("    pass")
        child.sendline("")
    
        child.timeout = 10 * IPYTHON_TESTING_TIMEOUT_SCALE
    
        child.expect('Exception:')
    
        child.expect(in_prompt)
        child.sendline(r'%debug')
>       child.expect('----> 2     raise Exception')

terminal/tests/test_debug_magic.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
    return self.expect_list(compiled_pattern_list,
/usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
/usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
    return self.timeout(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x7fa257d1be70>
err = TIMEOUT('Timeout exceeded.')

    def timeout(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg
    
            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
E           <pexpect.pty_spawn.spawn object at 0x7fa266f60a50>
E           command: /usr/bin/python3
E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor', '--simple-prompt']
E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [5]: '
E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [5]: '
E           after: <class 'pexpect.exceptions.TIMEOUT'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: False
E           pid: 4413
E           child_fd: 57
E           closed: False
E           timeout: 40.0
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: None
E           logfile_read: None
E           logfile_send: None
E           maxread: 2000
E           ignorecase: False
E           searchwindowsize: None
E           delaybeforesend: 0.05
E           delayafterclose: 0.1
E           delayafterterminate: 0.1
E           searcher: searcher_re:
E               0: re.compile(b'----> 2     raise Exception')

/usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
_____________________________ test_eval_formatter ______________________________

    def test_eval_formatter():
        f = text.EvalFormatter()
>       eval_formatter_check(f)

utils/tests/test_text.py:208: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
utils/tests/test_text.py:167: in eval_formatter_check
    s = f.format("{[n//i for i in range(1,8)]}", **ns)
/usr/lib64/python3.14/string.py:190: in format
    return self.vformat(format_string, args, kwargs)
/usr/lib64/python3.14/string.py:194: in vformat
    result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
/usr/lib64/python3.14/string.py:235: in _vformat
    obj, arg_used = self.get_field(field_name, args, kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <IPython.utils.text.EvalFormatter object at 0x7fa27fb096a0>
name = '0[n//i for i in range(1,8)]', args = ()
kwargs = {'__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'Attribute...ributeError'>, 'BaseException': <class 'BaseException'>, ...}, 'b': 'café', 'n': 12, 'os': <module 'os' (frozen)>, ...}

    def get_field(self, name: str, args: Any, kwargs: Any) -> Tuple[Any, str]:
>       v = eval(name, kwargs)
E         File "<string>", line 1
E           0[n//i for i in range(1,8)]
E                  ^^^
E       SyntaxError: invalid syntax

utils/text.py:547: SyntaxError

Some of them look easy to fix, but others will require deeper investigation.

Activity

  1. added theissue type on Apr 3, 2025
  2. Carreau commented on Apr 3, 2025

    @Carreau
    Member

    Thanks for doing this, the MemoryError seem to maybe be a Python issue as it tests an issue we had with CPython parser that was fixed in 3.9.

  3. Carreau commented on Apr 3, 2025

    @Carreau
    Member

    Also I expect the two failures in teardown to be fixed once the corresponding tests are passing.

  4. frenzymadness commented on Aug 19, 2025

    @frenzymadness
    ContributorAuthor

    Python 3.14 is in the release candidate state, and the final release is expected in October.

  5. frenzymadness commented on Aug 19, 2025

    @frenzymadness
    ContributorAuthor

    Log from the latest build:

    ==================================== ERRORS ====================================
    _____________ ERROR at teardown of TestAstTransform2.test_run_cell _____________
    self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_run_cell>
        def tearDown(self):
    >       ip.ast_transformers.remove(self.intwrapper)
    E       ValueError: list.remove(x): x not in list
    core/tests/test_interactiveshell.py:850: ValueError
    ______________ ERROR at teardown of TestAstTransform2.test_timeit ______________
    self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_timeit>
        def tearDown(self):
    >       ip.ast_transformers.remove(self.intwrapper)
    E       ValueError: list.remove(x): x not in list
    core/tests/test_interactiveshell.py:850: ValueError
    =================================== FAILURES ===================================
    ______________________________ test_unicode_range ______________________________
        def test_unicode_range():
            """
            Test that the ranges we test for unicode names give the same number of
            results than testing the full length.
            """
        
            expected_list = _unicode_name_compute([(0, 0x110000)])
            test = _unicode_name_compute(_UNICODE_RANGES)
            len_exp = len(expected_list)
            len_test = len(test)
        
            # do not inline the len() or on error pytest will try to print the 130 000 +
            # elements.
            message = None
            if len_exp != len_test or len_exp > 131808:
                size, start, stop, prct = recompute_unicode_ranges()
                message = f"""_UNICODE_RANGES likely wrong and need updating. This is
                likely due to a new release of Python. We've find that the biggest gap
                in unicode characters has reduces in size to be {size} characters
                ({prct}), from {start}, to {stop}. In completer.py likely update to
        
                    _UNICODE_RANGES = [(32, {start}), ({stop}, 0xe01f0)]
        
                And update the assertion below to use
        
                    len_exp <= {len_exp}
                """
            assert len_exp == len_test, message
        
            # fail if new unicode symbols have been added.
    >       assert len_exp <= 143668, message
    E       AssertionError: _UNICODE_RANGES likely wrong and need updating. This is
    E                 likely due to a new release of Python. We've find that the biggest gap
    E                 in unicode characters has reduces in size to be 711762 characters
    E                 (78%), from 0x323b0, to 0xe0001. In completer.py likely update to
    E         
    E                     _UNICODE_RANGES = [(32, 0x323b0), (0xe0001, 0xe01f0)]
    E         
    E                 And update the assertion below to use
    E         
    E                     len_exp <= 148853
    E                 
    E       assert 148853 <= 143668
    core/tests/test_completer.py:129: AssertionError
    _______________________ test_interruptible_core_debugger _______________________
    self = <IPython.core.debugger.InterruptiblePdb object at 0x7fff27791be0>
    context = 0
        def print_stack_trace(self, context=None):
            Colors = self.color_scheme_table.active_colors
            ColorsNormal = Colors.Normal
            if context is None:
                context = self.context
            try:
                context = int(context)
                if context <= 0:
    >               raise ValueError("Context must be a positive integer")
    E               ValueError: Context must be a positive integer
    core/debugger.py:496: ValueError
    The above exception was the direct cause of the following exception:
        def test_interruptible_core_debugger():
            """The debugger can be interrupted.
        
            The presumption is there is some mechanism that causes a KeyboardInterrupt
            (this is implemented in ipykernel).  We want to ensure the
            KeyboardInterrupt cause debugging to cease.
            """
            def raising_input(msg="", called=[0]):
                called[0] += 1
                assert called[0] == 1, "input() should only be called once!"
                raise KeyboardInterrupt()
        
            tracer_orig = sys.gettrace()
            try:
                with patch.object(builtins, "input", raising_input):
    >               debugger.InterruptiblePdb().set_trace()
    core/tests/test_debugger.py:235: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    /usr/lib64/python3.14/bdb.py:298: in trace_dispatch
        return self.dispatch_opcode(frame, arg)
    /usr/lib64/python3.14/bdb.py:415: in dispatch_opcode
        self.user_opcode(frame)
    /usr/lib64/python3.14/pdb.py:547: in user_line
        self.interaction(frame, None)
    core/debugger.py:466: in interaction
        OldPdb.interaction(self, frame, tb_or_exc)
    /usr/lib64/python3.14/pdb.py:736: in interaction
        self._cmdloop()
    core/debugger.py:1119: in _cmdloop
        self.cmdloop()
    core/debugger.py:1105: in cmdloop
        return OldPdb.cmdloop(self, intro=intro)
    /usr/lib64/python3.14/cmd.py:149: in cmdloop
        stop = self.onecmd(line)
    /usr/lib64/python3.14/pdb.py:1037: in onecmd
        return getattr(self, command)(arg)
    /usr/lib64/python3.14/pdb.py:1217: in _pdbcmd_print_frame_status
        self.print_stack_trace(0)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    self = <IPython.core.debugger.InterruptiblePdb object at 0x7fff27791be0>
    context = 0
        def print_stack_trace(self, context=None):
            Colors = self.color_scheme_table.active_colors
            ColorsNormal = Colors.Normal
            if context is None:
                context = self.context
            try:
                context = int(context)
                if context <= 0:
                    raise ValueError("Context must be a positive integer")
            except (TypeError, ValueError) as e:
    >               raise ValueError("Context must be a positive integer") from e
    E               ValueError: Context must be a positive integer
    core/debugger.py:498: ValueError
    _______________________________ test_xmode_skip ________________________________
        @skip_win32
        def test_xmode_skip():
            """that xmode skip frames
        
            Not as a doctest as pytest does not run doctests.
            """
            import pexpect
            env = os.environ.copy()
            env["IPY_TEST_SIMPLE_PROMPT"] = "1"
        
            child = pexpect.spawn(
                sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env
            )
            child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
        
            child.expect("IPython")
            child.expect("\n")
            child.expect_exact("In [1]")
        
            block = dedent(
                """
            def f():
                __tracebackhide__ = True
                g()
        
            def g():
                raise ValueError
        
            f()
            """
            )
        
            for line in block.splitlines():
                child.sendline(line)
                child.expect_exact(line)
            child.expect_exact("skipping")
        
            block = dedent(
                """
            def f():
                __tracebackhide__ = True
                g()
        
            def g():
                from IPython.core.debugger import set_trace
                set_trace()
        
            f()
            """
            )
        
            for line in block.splitlines():
                child.sendline(line)
                child.expect_exact(line)
        
    >       child.expect("ipdb>")
    core/tests/test_debugger.py:301: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
        return self.expect_list(compiled_pattern_list,
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
        return exp.expect_loop(timeout)
    /usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
        return self.timeout(e)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    self = <pexpect.expect.Expecter object at 0x7fff26c9b3d0>
    err = TIMEOUT('Timeout exceeded.')
        def timeout(self, err=None):
            spawn = self.spawn
        
            spawn.before = spawn._before.getvalue()
            spawn.after = TIMEOUT
            index = self.searcher.timeout_index
            if index >= 0:
                spawn.match = TIMEOUT
                spawn.match_index = index
                return index
            else:
                spawn.match = None
                spawn.match_index = None
                msg = str(spawn)
                msg += '\nsearcher: %s' % self.searcher
                if err is not None:
                    msg = str(err) + '\n' + msg
        
                exc = TIMEOUT(msg)
                exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
    >           raise exc
    E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
    E           <pexpect.pty_spawn.spawn object at 0x7fff277930e0>
    E           command: /usr/bin/python3
    E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor']
    E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [7]: '
    E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [7]: '
    E           after: <class 'pexpect.exceptions.TIMEOUT'>
    E           match: None
    E           match_index: None
    E           exitstatus: None
    E           flag_eof: False
    E           pid: 3332
    E           child_fd: 19
    E           closed: False
    E           timeout: 60.0
    E           delimiter: <class 'pexpect.exceptions.EOF'>
    E           logfile: None
    E           logfile_read: None
    E           logfile_send: None
    E           maxread: 2000
    E           ignorecase: False
    E           searchwindowsize: None
    E           delaybeforesend: 0.05
    E           delayafterclose: 0.1
    E           delayafterterminate: 0.1
    E           searcher: searcher_re:
    E               0: re.compile(b'ipdb>')
    /usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
    ____________________________ test_where_erase_value ____________________________
        @skip_win32
        def test_where_erase_value():
            """Test that `where` does not access f_locals and erase values."""
            import pexpect
        
            env = os.environ.copy()
            env["IPY_TEST_SIMPLE_PROMPT"] = "1"
        
            child = pexpect.spawn(
                sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env
            )
            child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
        
            child.expect("IPython")
            child.expect("\n")
            child.expect_exact("In [1]")
        
            block = dedent(
                """
            def simple_f():
                 myvar = 1
                 print(myvar)
                 1/0
                 print(myvar)
            simple_f()    """
            )
        
            for line in block.splitlines():
                child.sendline(line)
                child.expect_exact(line)
            child.expect_exact("ZeroDivisionError")
            child.expect_exact("In [2]:")
        
            child.sendline("%debug")
        
            ##
    >       child.expect("ipdb>")
    core/tests/test_debugger.py:564: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
        return self.expect_list(compiled_pattern_list,
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
        return exp.expect_loop(timeout)
    /usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
        return self.timeout(e)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    self = <pexpect.expect.Expecter object at 0x7fff27bfa120>
    err = TIMEOUT('Timeout exceeded.')
        def timeout(self, err=None):
            spawn = self.spawn
        
            spawn.before = spawn._before.getvalue()
            spawn.after = TIMEOUT
            index = self.searcher.timeout_index
            if index >= 0:
                spawn.match = TIMEOUT
                spawn.match_index = index
                return index
            else:
                spawn.match = None
                spawn.match_index = None
                msg = str(spawn)
                msg += '\nsearcher: %s' % self.searcher
                if err is not None:
                    msg = str(err) + '\n' + msg
        
                exc = TIMEOUT(msg)
                exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
    >           raise exc
    E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
    E           <pexpect.pty_spawn.spawn object at 0x7fff26d7f250>
    E           command: /usr/bin/python3
    E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor']
    E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [3]: '
    E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [3]: '
    E           after: <class 'pexpect.exceptions.TIMEOUT'>
    E           match: None
    E           match_index: None
    E           exitstatus: None
    E           flag_eof: False
    E           pid: 3334
    E           child_fd: 20
    E           closed: False
    E           timeout: 60.0
    E           delimiter: <class 'pexpect.exceptions.EOF'>
    E           logfile: None
    E           logfile_read: None
    E           logfile_send: None
    E           maxread: 2000
    E           ignorecase: False
    E           searchwindowsize: None
    E           delaybeforesend: 0.05
    E           delayafterclose: 0.1
    E           delayafterterminate: 0.1
    E           searcher: searcher_re:
    E               0: re.compile(b'ipdb>')
    /usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
    _______________________ TestAstTransform2.test_run_cell ________________________
    self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_run_cell>
        def test_run_cell(self):
            ip.run_cell("n = 2")
    >       self.assertEqual(self.calls, [(2,)])
    E       AssertionError: Lists differ: [] != [(2,)]
    E       
    E       Second list contains 1 additional elements.
    E       First extra element 0:
    E       (2,)
    E       
    E       - []
    E       + [(2,)]
    core/tests/test_interactiveshell.py:855: AssertionError
    ________________________ TestAstTransform2.test_timeit _________________________
    self = <IPython.core.tests.test_interactiveshell.TestAstTransform2 testMethod=test_timeit>
        def test_timeit(self):
            called = set()
            def f(x):
                called.add(x)
            ip.push({'f':f})
        
            with tt.AssertPrints("std. dev. of"):
                ip.run_line_magic("timeit", "-n1 f(1)")
    >       self.assertEqual(called, {(1,)})
    E       AssertionError: Items in the first set but not the second:
    E       1
    E       Items in the second set but not the first:
    E       (1,)
    core/tests/test_interactiveshell.py:873: AssertionError
    __________________________ test_render_signature_long __________________________
        def test_render_signature_long():
            from typing import Optional
        
            def long_function(
                a_really_long_parameter: int,
                and_another_long_one: bool = False,
                let_us_make_sure_this_is_looong: Optional[str] = None,
            ) -> bool: pass
        
            sig = oinspect._render_signature(
                signature(long_function),
                long_function.__name__,
            )
            expected = """\
        long_function(
            a_really_long_parameter: int,
            and_another_long_one: bool = False,
            let_us_make_sure_this_is_looong: Optional[str] = None,
        ) -> bool\
        """
        
    >       assert sig == expected
    E       AssertionError: assert 'long_functio...e,\n) -> bool' == 'long_functio...e,\n) -> bool'
    E         
    E         Skipping 116 identical leading characters in diff, use -v to show
    E         - s_looong: Optional[str] = None,
    E         + s_looong: str | None = None,
    E           ) -> bool
    core/tests/test_oinspect.py:589: AssertionError
    _______________________ test_profile_create_ipython_dir ________________________
        def test_profile_create_ipython_dir():
            """ipython profile create respects --ipython-dir"""
            with TemporaryDirectory() as td:
                getoutput(
                    [
                        sys.executable,
                        "-m",
                        "IPython",
                        "profile",
                        "create",
                        "foo",
                        "--ipython-dir=%s" % td,
                    ]
                )
                profile_dir = Path(td) / "profile_foo"
                assert Path(profile_dir).exists()
                ipython_config = profile_dir / "ipython_config.py"
    >           assert Path(ipython_config).exists()
    E           AssertionError: assert False
    E            +  where False = exists()
    E            +    where exists = PosixPath('/tmp/tmpx17b0boy/profile_foo/ipython_config.py').exists
    E            +      where PosixPath('/tmp/tmpx17b0boy/profile_foo/ipython_config.py') = Path(PosixPath('/tmp/tmpx17b0boy/profile_foo/ipython_config.py'))
    core/tests/test_profile.py:161: AssertionError
    __________________ test_debug_magic_passes_through_generators __________________
        @skip_win32
        def test_debug_magic_passes_through_generators():
            """
            This test that we can correctly pass through frames of a generator post-mortem.
            """
            import pexpect
            import re
            in_prompt = re.compile(br'In ?\[\d+\]:')
            ipdb_prompt = 'ipdb>'
            env = os.environ.copy()
            child = pexpect.spawn(sys.executable, ['-m', 'IPython', '--colors=nocolor', '--simple-prompt'],
                                  env=env)
            child.timeout = 15 * IPYTHON_TESTING_TIMEOUT_SCALE
        
            child.expect(in_prompt)
        
            child.timeout = 2 * IPYTHON_TESTING_TIMEOUT_SCALE
        
            child.sendline("def f(x):")
            child.sendline("    raise Exception")
            child.sendline("")
        
            child.expect(in_prompt)
            child.sendline("gen = (f(x) for x in [0])")
            child.sendline("")
        
            child.expect(in_prompt)
            child.sendline("for x in gen:")
            child.sendline("    pass")
            child.sendline("")
        
            child.timeout = 10 * IPYTHON_TESTING_TIMEOUT_SCALE
        
            child.expect('Exception:')
        
            child.expect(in_prompt)
            child.sendline(r'%debug')
    >       child.expect('----> 2     raise Exception')
    terminal/tests/test_debug_magic.py:60: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:354: in expect
        return self.expect_list(compiled_pattern_list,
    /usr/lib/python3.14/site-packages/pexpect/spawnbase.py:383: in expect_list
        return exp.expect_loop(timeout)
    /usr/lib/python3.14/site-packages/pexpect/expect.py:181: in expect_loop
        return self.timeout(e)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    self = <pexpect.expect.Expecter object at 0x7fff2d2dc6e0>
    err = TIMEOUT('Timeout exceeded.')
        def timeout(self, err=None):
            spawn = self.spawn
        
            spawn.before = spawn._before.getvalue()
            spawn.after = TIMEOUT
            index = self.searcher.timeout_index
            if index >= 0:
                spawn.match = TIMEOUT
                spawn.match_index = index
                return index
            else:
                spawn.match = None
                spawn.match_index = None
                msg = str(spawn)
                msg += '\nsearcher: %s' % self.searcher
                if err is not None:
                    msg = str(err) + '\n' + msg
        
                exc = TIMEOUT(msg)
                exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
    >           raise exc
    E           pexpect.exceptions.TIMEOUT: Timeout exceeded.
    E           <pexpect.pty_spawn.spawn object at 0x7fff2d2f0410>
    E           command: /usr/bin/python3
    E           args: ['/usr/bin/python3', '-m', 'IPython', '--colors=nocolor', '--simple-prompt']
    E           buffer (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [5]: '
    E           before (last 100 chars): b'\n    499 try:\r\n    500     skipped = 0\r\n\r\nValueError: Context must be a positive integer\r\n\r\nIn [5]: '
    E           after: <class 'pexpect.exceptions.TIMEOUT'>
    E           match: None
    E           match_index: None
    E           exitstatus: None
    E           flag_eof: False
    E           pid: 3408
    E           child_fd: 56
    E           closed: False
    E           timeout: 40.0
    E           delimiter: <class 'pexpect.exceptions.EOF'>
    E           logfile: None
    E           logfile_read: None
    E           logfile_send: None
    E           maxread: 2000
    E           ignorecase: False
    E           searchwindowsize: None
    E           delaybeforesend: 0.05
    E           delayafterclose: 0.1
    E           delayafterterminate: 0.1
    E           searcher: searcher_re:
    E               0: re.compile(b'----> 2     raise Exception')
    /usr/lib/python3.14/site-packages/pexpect/expect.py:144: TIMEOUT
    ___________________________ test_parse_sample[Linux] ___________________________
    style = 'Linux'
        def test_parse_sample(style):
            """and test writing to a buffer"""
            buf = io.StringIO()
            p = Parser(style=style)
            p.format(sample, buf)
            buf.seek(0)
            f1 = buf.read()
        
    >       assert "ERROR" not in f1
    E       assert 'ERROR' not in '\x1b[1;33m\...m\n\x1b[0m\n'
    E         
    E         'ERROR' is contained here:
    E           ;31m
    E           
    E           *** ERROR: 'u' and 'r' prefixes are incompatible    with io.open(ru'unicode', encoding='utf-8'):
    E         ?     +++++
    E                   raise ValueError("escape 
    ...
    E         
    E         ...Full output truncated (9 lines hidden), use '-vv' to show
    utils/tests/test_pycolorize.py:63: AssertionError
    __________________________ test_parse_sample[LightBG] __________________________
    style = 'LightBG'
        def test_parse_sample(style):
            """and test writing to a buffer"""
            buf = io.StringIO()
            p = Parser(style=style)
            p.format(sample, buf)
            buf.seek(0)
            f1 = buf.read()
        
    >       assert "ERROR" not in f1
    E       assert 'ERROR' not in '\x1b[0;34m\...m\n\x1b[0m\n'
    E         
    E         'ERROR' is contained here:
    E           ;31m
    E           
    E           *** ERROR: 'u' and 'r' prefixes are incompatible    with io.open(ru'unicode', encoding='utf-8'):
    E         ?     +++++
    E                   raise ValueError("escape 
    ...
    E         
    E         ...Full output truncated (9 lines hidden), use '-vv' to show
    utils/tests/test_pycolorize.py:63: AssertionError
    __________________________ test_parse_sample[Neutral] __________________________
    style = 'Neutral'
        def test_parse_sample(style):
            """and test writing to a buffer"""
            buf = io.StringIO()
            p = Parser(style=style)
            p.format(sample, buf)
            buf.seek(0)
            f1 = buf.read()
        
    >       assert "ERROR" not in f1
    E       assert 'ERROR' not in '\x1b[0;34m\...m\n\x1b[0m\n'
    E         
    E         'ERROR' is contained here:
    E           ;31m
    E           
    E           *** ERROR: 'u' and 'r' prefixes are incompatible    with io.open(ru'unicode', encoding='utf-8'):
    E         ?     +++++
    E                   raise ValueError("escape 
    ...
    E         
    E         ...Full output truncated (9 lines hidden), use '-vv' to show
    utils/tests/test_pycolorize.py:63: AssertionError
    _____________________________ test_eval_formatter ______________________________
        def test_eval_formatter():
            f = text.EvalFormatter()
    >       eval_formatter_check(f)
    utils/tests/test_text.py:208: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    utils/tests/test_text.py:167: in eval_formatter_check
        s = f.format("{[n//i for i in range(1,8)]}", **ns)
    /usr/lib64/python3.14/string/__init__.py:205: in format
        return self.vformat(format_string, args, kwargs)
    /usr/lib64/python3.14/string/__init__.py:209: in vformat
        result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
    /usr/lib64/python3.14/string/__init__.py:250: in _vformat
        obj, arg_used = self.get_field(field_name, args, kwargs)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    self = <IPython.utils.text.EvalFormatter object at 0x7fff2426dbe0>
    name = '0[n//i for i in range(1,8)]', args = ()
    kwargs = {'__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'Attribute...ributeError'>, 'BaseException': <class 'BaseException'>, ...}, 'b': 'café', 'n': 12, 'os': <module 'os' (frozen)>, ...}
        def get_field(self, name: str, args: Any, kwargs: Any) -> Tuple[Any, str]:
    >       v = eval(name, kwargs)
    E         File "<string>", line 1
    E           0[n//i for i in range(1,8)]
    E                  ^^^
    E       SyntaxError: invalid syntax
    utils/text.py:547: SyntaxError
    =============================== warnings summary ===============================
    core/tests/test_guarded_eval.py:318
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/tests/test_guarded_eval.py:318: PytestCollectionWarning: cannot collect test class 'TestProtocol' because it has a __init__ constructor (from: core/tests/test_guarded_eval.py)
        class TestProtocol(Protocol):
    core/tests/test_guarded_eval.py:323
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/tests/test_guarded_eval.py:323: PytestCollectionWarning: cannot collect test class 'TestProtocolImplementer' because it has a __init__ constructor (from: core/tests/test_guarded_eval.py)
        class TestProtocolImplementer(TestProtocol):
    core/inputtransformer.py:117: 10 warnings
    core/tests/test_inputsplitter.py: 145 warnings
    core/tests/test_inputtransformer.py: 29 warnings
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/inputtransformer.py:117: DeprecationWarning: `InputTransformer` has been deprecated since IPython 7.0 and emit a warnig since IPython 8.31, it will be removed in the future
        super().__init__()
    core/inputtransformer.py:84: 10 warnings
    core/tests/test_inputsplitter.py: 145 warnings
    core/tests/test_inputtransformer.py: 33 warnings
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/inputtransformer.py:84: DeprecationWarning: `CoroutineInputTransformer` has been deprecated since IPython 7.0 and emit a warnig since IPython 8.31, it will be removed in the future
        return cls(func, **kwargs)  # type: ignore [call-arg]
    core/inputtransformer.py:91: 8 warnings
    core/tests/test_inputsplitter.py: 116 warnings
    core/tests/test_inputtransformer.py: 10 warnings
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/inputtransformer.py:91: DeprecationWarning: `InputTransformer` has been deprecated since IPython 7.0 and emit a warnig since IPython 8.31, it will be removed in the future
        super().__init__()
    core/inputtransformer.py:84: 8 warnings
    core/tests/test_inputsplitter.py: 116 warnings
    core/tests/test_inputtransformer.py: 10 warnings
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/inputtransformer.py:84: DeprecationWarning: `StatelessInputTransformer` has been deprecated since IPython 7.0 and emit a warnig since IPython 8.31, it will be removed in the future
        return cls(func, **kwargs)  # type: ignore [call-arg]
    core/inputtransformer.py:203: 2 warnings
    core/tests/test_inputsplitter.py: 29 warnings
    core/tests/test_inputtransformer.py: 6 warnings
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/inputtransformer.py:203: DeprecationWarning: `CoroutineInputTransformer` has been deprecated since IPython 7.0 and emit a warnig since IPython 8.31, it will be removed in the future
        super().__init__(None)
    core/tests/test_alias.py::test_alias_lifecycle
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:1216: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        return asyncio.get_event_loop_policy()
    core/tests/test_async_helpers.py::AsyncTest::test_in_func_no_error
      <>:8: SyntaxWarning: 'return' in a 'finally' block
    core/tests/test_async_helpers.py::AsyncTest::test_in_func_no_error
    core/tests/test_async_helpers.py::AsyncTest::test_in_func_no_error
      <ipython-input-1-a475a201f42b>:8: SyntaxWarning: 'return' in a 'finally' block
        return
    core/tests/test_async_helpers.py::AsyncTest::test_top_level_return_error
      <>:6: SyntaxWarning: 'return' in a 'finally' block
    core/tests/test_async_helpers.py::AsyncTest::test_top_level_return_error
    core/tests/test_async_helpers.py::AsyncTest::test_top_level_return_error
      <ipython-input-1-714c4c819d0d>:6: SyntaxWarning: 'return' in a 'finally' block
        return
    core/tests/test_debugger.py: 2 warnings
    core/tests/test_interactiveshell.py: 3 warnings
    terminal/tests/test_debug_magic.py: 1 warning
    terminal/tests/test_embed.py: 1 warning
    utils/tests/test_process.py: 3 warnings
      /usr/lib64/python3.14/pty.py:66: DeprecationWarning: This process (pid=3329) is multi-threaded, use of forkpty() may lead to deadlocks in the child.
        pid, fd = os.forkpty()
    core/tests/test_history.py::test_timestamp_type
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/history.py:335: DeprecationWarning: The default timestamp converter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
        return self.db.execute(query, (session,)).fetchone()
    core/tests/test_inputtransformer2.py::test_check_make_token_by_line_never_ends_empty
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/tests/test_inputtransformer2.py:180: UserWarning: `make_tokens_by_line` received a list of lines which do not have lineending markers ('\n', '\r', '\r\n', '\x0b', '\x0c'), behavior will be unspecified
        assert make_tokens_by_line(c + k)[-1] != []
    core/tests/test_interactiveshell.py::TestAstTransform2::test_run_cell
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/interactiveshell.py:3413: UserWarning: AST transformer <IPython.core.tests.test_interactiveshell.IntegerWrapper object at 0x7fff2d2892b0> threw an error. It will be unregistered. 'Constant' object has no attribute 'n'
        warn(
    core/tests/test_interactiveshell.py::TestAstTransform2::test_timeit
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/interactiveshell.py:3413: UserWarning: AST transformer <IPython.core.tests.test_interactiveshell.IntegerWrapper object at 0x7fff2de10cd0> threw an error. It will be unregistered. 'Constant' object has no attribute 'n'
        warn(
    core/tests/test_interactiveshell.py::test_run_cell_async
      /usr/lib64/python3.14/asyncio/events.py:94: DeprecationWarning: `run_cell_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
        self._context.run(self._callback, *self._args)
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:874: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        _restore_event_loop_policy(asyncio.get_event_loop_policy()),
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:772: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        old_loop_policy = asyncio.get_event_loop_policy()
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:777: DeprecationWarning: 'asyncio.set_event_loop_policy' is deprecated and slated for removal in Python 3.16
        asyncio.set_event_loop_policy(policy)
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:1183: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        loop = asyncio.get_event_loop_policy().new_event_loop()
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:889: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        policy = asyncio.get_event_loop_policy()
    core/tests/test_magic.py::test_script_bg_out
      core/tests/test_magic.py:1201: PytestWarning: The test <Function test_script_bg_out> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
        async def test_script_bg_out():
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
      /usr/lib/python3.14/site-packages/_pytest/python.py:148: PytestUnhandledCoroutineWarning: async def functions are not natively supported and have been skipped.
      You need to install a suitable plugin for your async framework, for example:
        - anyio
        - pytest-asyncio
        - pytest-tornasync
        - pytest-trio
        - pytest-twisted
        warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid)))
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:794: DeprecationWarning: 'asyncio.set_event_loop_policy' is deprecated and slated for removal in Python 3.16
        asyncio.set_event_loop_policy(old_loop_policy)
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:942: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        policy = asyncio.get_event_loop_policy()
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:966: DeprecationWarning: 'asyncio.set_event_loop_policy' is deprecated and slated for removal in Python 3.16
        asyncio.set_event_loop_policy(previous_policy)
    core/tests/test_magic.py::test_script_bg_out
    core/tests/test_magic.py::test_script_bg_err
    core/tests/test_magic.py::test_script_bg_out_err
    core/tests/test_magic.py::test_script_bg_proc
    core/tests/test_magic.py::test_script_streams_continiously
    terminal/tests/test_shortcuts.py::test_navigable_provider
    terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries
      /usr/lib/python3.14/site-packages/pytest_asyncio/plugin.py:978: DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16
        policy = asyncio.get_event_loop_policy()
    core/tests/test_magic.py::test_script_bg_err
      core/tests/test_magic.py:1208: PytestWarning: The test <Function test_script_bg_err> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
        async def test_script_bg_err():
    core/tests/test_magic.py::test_script_bg_out_err
      core/tests/test_magic.py:1219: PytestWarning: The test <Function test_script_bg_out_err> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
        async def test_script_bg_out_err():
    core/tests/test_magic.py::test_script_bg_proc
      core/tests/test_magic.py:1238: PytestWarning: The test <Function test_script_bg_proc> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
        async def test_script_bg_proc():
    core/tests/test_magic.py::test_script_streams_continiously
      core/tests/test_magic.py:1272: PytestWarning: The test <Function test_script_streams_continiously> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
        async def test_script_streams_continiously(capsys):
    core/tests/test_pylabtools.py::test_no_gui_backends
    core/tests/test_pylabtools.py::test_no_gui_backends
    core/tests/test_pylabtools.py::test_no_gui_backends
    core/tests/test_pylabtools.py::test_no_gui_backends
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/pylabtools.py:77: DeprecationWarning: backend2gui is deprecated since IPython 8.24, backends are managed in matplotlib and can be externally registered.
        warnings.warn(
    core/tests/test_run.py::TestMagicRunSimple::test_run_nb_error
    core/tests/test_run.py::TestMagicRunSimple::test_run_nb_error
    core/tests/test_run.py::TestMagicRunSimple::test_run_nb_error
      /usr/lib/python3.14/site-packages/_pytest/python_api.py:976: DeprecationWarning: `magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).
        func(*args[1:], **kwargs)
    core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_sysexit_while_handling_error
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/core/interactiveshell.py:3590: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
        warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
    terminal/tests/test_shortcuts.py::test_slow_llm_provider_should_not_block_init
      /builddir/build/BUILD/ipython-8.37.0-build/BUILDROOT/usr/lib/python3.14/site-packages/IPython/terminal/interactiveshell.py:483: UserWarning: TerminalInteractiveShell.llm_provider_class is a provisional  API as of IPython 8.32, and may change without warnings.
        warn(
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    =========================== short test summary info ============================
    FAILED core/tests/test_completer.py::test_unicode_range - AssertionError: _UN...
    FAILED core/tests/test_debugger.py::test_interruptible_core_debugger - ValueE...
    FAILED core/tests/test_debugger.py::test_xmode_skip - pexpect.exceptions.TIME...
    FAILED core/tests/test_debugger.py::test_where_erase_value - pexpect.exceptio...
    FAILED core/tests/test_interactiveshell.py::TestAstTransform2::test_run_cell
    FAILED core/tests/test_interactiveshell.py::TestAstTransform2::test_timeit - ...
    FAILED core/tests/test_oinspect.py::test_render_signature_long - AssertionErr...
    FAILED core/tests/test_profile.py::test_profile_create_ipython_dir - Assertio...
    FAILED terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators
    FAILED utils/tests/test_pycolorize.py::test_parse_sample[Linux] - assert 'ERR...
    FAILED utils/tests/test_pycolorize.py::test_parse_sample[LightBG] - assert 'E...
    FAILED utils/tests/test_pycolorize.py::test_parse_sample[Neutral] - assert 'E...
    FAILED utils/tests/test_text.py::test_eval_formatter -   File "<string>", line 1
    ERROR core/tests/test_interactiveshell.py::TestAstTransform2::test_run_cell
    ERROR core/tests/test_interactiveshell.py::TestAstTransform2::test_timeit - V...
    = 13 failed, 1429 passed, 51 skipped, 2 deselected, 3 xfailed, 783 warnings, 2 errors in 245.25s (0:04:05) =
    
  6. Carreau commented on Aug 19, 2025

    @Carreau
    Member

    i'm on parental leave until october, so will likely not get to it until then. Unless this is critical then I can try to carve some time in september.

  7. frenzymadness commented on Aug 20, 2025

    @frenzymadness
    ContributorAuthor

    Thank you for your openness.

  8. krassowski commented on Aug 20, 2025

    @krassowski
    Member

    I will take a stab at fixing some of the failures this week.

  9. krassowski commented on Aug 20, 2025

    @krassowski
    Member

    On one level we are blocked by jedi/parso:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions