Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/interpreter/test/test_app_main.py::TestInteraction::()::test_future_in_python_startup

self = <pypy.interpreter.test.test_app_main.TestInteraction instance at 0x000000001cab0be0>
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x000000001cab0c20>

    def test_future_in_python_startup(self, monkeypatch):
        monkeypatch.setenv('PYTHONSTARTUP', script_with_future)
        child = self.spawn([])
>       child.expect('>>> ')

interpreter/test/test_app_main.py:558: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../virt_test/site-packages/pexpect/spawnbase.py:355: in expect
    timeout, searchwindowsize, async_)
../virt_test/site-packages/pexpect/spawnbase.py:383: in expect_list
    return exp.expect_loop(timeout)
../virt_test/site-packages/pexpect/expect.py:179: in expect_loop
    return self.eof(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x000000001cab47c8>
err = EOF('End Of File (EOF). Exception style platform.',)

    def eof(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn._buffer = spawn.buffer_type()
        spawn._before = spawn.buffer_type()
        spawn.after = EOF
        index = self.searcher.eof_index
        if index >= 0:
            spawn.match = EOF
            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 = EOF(msg)
            exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
>           raise exc
E           EOF: End Of File (EOF). Exception style platform.
E           <pexpect.pty_spawn.spawn object at 0x000000001cab4480>
E           command: /usr/local/bin/python3.12
E           args: ['/usr/local/bin/python3.12', '/buildbot/slave/own-linux-x86-64/build/pypy/interpreter/app_main.py']
E           buffer (last 100 chars): ''
E           before (last 100 chars): '(code, namespace)\r\n  File "<string>", line 1, in <module>\r\nNameError: name \'object\' is not defined\r\n'
E           after: <class 'pexpect.exceptions.EOF'>
E           match: None
E           match_index: None
E           exitstatus: None
E           flag_eof: True
E           pid: 158800
E           child_fd: 194
E           closed: False
E           timeout: 10
E           delimiter: <class 'pexpect.exceptions.EOF'>
E           logfile: <_pytest.capture.EncodedFile object at 0x0000000001877868>
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('>>> ')

../virt_test/site-packages/pexpect/expect.py:122: EOF
---------- Captured stdout call ----------
SPAWN: /usr/local/bin/python3.12 /buildbot/slave/own-linux-x86-64/build/pypy/interpreter/app_main.py {'env': None, 'timeout': 10}
Python 3.12.13 (main, May 13 2026, 03:55:23) [GCC 14.2.1 20250110 (Red Hat 14.2.1-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/buildbot/slave/own-linux-x86-64/build/pypy/interpreter/app_main.py", line 166, in run_toplevel
    f(*fargs, **fkwds)
  File "<frozen site>", line 462, in register_readline
  File "/buildbot/slave/own-linux-x86-64/build/lib_pypy/readline.py", line 10, in <module>
    from pyrepl.readline import *
  File "/buildbot/slave/own-linux-x86-64/build/lib_pypy/pyrepl/readline.py", line 32, in <module>
    from dataclasses import dataclass, field
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/dataclasses.py", line 1, in <module>
    import re
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/re/__init__.py", line 124, in <module>
    import enum
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/enum.py", line 5, in <module>
    from functools import reduce
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/functools.py", line 442, in <module>
    _CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/collections/__init__.py", line 492, in namedtuple
    exec(code, namespace)
  File "<string>", line 1, in <module>
NameError: name 'object' is not defined
Traceback (most recent call last):
  File "/buildbot/slave/own-linux-x86-64/build/pypy/interpreter/app_main.py", line 166, in run_toplevel
    f(*fargs, **fkwds)
  File "/buildbot/slave/own-linux-x86-64/build/lib_pypy/_pypy_interact.py", line 36, in interactive_console
    from pyrepl.simple_interact import check
  File "/buildbot/slave/own-linux-x86-64/build/lib_pypy/pyrepl/simple_interact.py", line 29, in <module>
    import linecache
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/linecache.py", line 8, in <module>
    import functools
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/functools.py", line 442, in <module>
    _CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/slave/own-linux-x86-64/build/lib-python/3/collections/__init__.py", line 492, in namedtuple
    exec(code, namespace)
  File "<string>", line 1, in <module>
NameError: name 'object' is not defined
builder: own-linux-x86-64 build #11021+
test: pypy/interpreter/test/test_app_main.py::TestInteraction::()::test_future_in_python_startup