Closed
Description
Bug report
Bug description:
I'm seeing this on a Dell laptop running XUbuntu 22.04 and MacBook Pro M1 running MacOS 14.5. In both cases, Python was built on main with the following sequence:
git fetch --all
git pull
git clean -fdx
./configure
nice make -j test
On the Mac, I also tested on the 3.13 branch and see the same failure (same out as below, save for the printed interpreter version details).
Dell:
======================================================================
FAIL: test_exposed_globals_in_repl (test.test_pyrepl.test_pyrepl.TestMain.test_exposed_globals_in_repl)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/skip/src/python/cpython/Lib/test/support/__init__.py", line 2622, in wrapper
return func(*args, **kwargs)
File "/home/skip/src/python/cpython/Lib/test/test_pyrepl/test_pyrepl.py", line 868, in test_exposed_globals_in_repl
self.assertTrue(case1 or case2 or case3 or case4, output)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true : sorted(dir())
exit
Python 3.14.0a0 (heads/main:19d1e43e43d, Jul 4 2024, 06:49:38) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> s
>>> so
>>> sor
>>> sort
>>> sorte
>>> sorted
>>> sorted(
>>> sorted(d
>>> sorted(di
>>> sorted(dir
>>> sorted(dir(
>>> sorted(dir()
>>> sorted(dir())
['__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__ior__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__ror__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
>>>
>>> e
>>> ex
>>> exi
>>> exit
Mac:
======================================================================
FAIL: test_exposed_globals_in_repl (test.test_pyrepl.test_pyrepl.TestMain.test_exposed_globals_in_repl)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/skip/src/python/cpython/Lib/test/support/__init__.py", line 2622, in wrapper
return func(*args, **kwargs)
File "/Users/skip/src/python/cpython/Lib/test/test_pyrepl/test_pyrepl.py", line 868, in test_exposed_globals_in_repl
self.assertTrue(case1 or case2 or case3 or case4, output)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true : sorted(dir())
exit
Python 3.14.0a0 (heads/main:19d1e43e43d, Jul 4 2024, 06:49:28) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> s
>>> sor
>>> sorted(
>>> sorted(d
>>> sorted(di
>>> sorted(dir())
['__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__ior__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__ror__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
>>> ex
>>> exit
CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
Linux, macOS
Linked PRs
- gh-121359: Run test_pyrepl in isolated mode #121414
- [3.13] gh-121359: Run test_pyrepl in isolated mode (GH-121414) #121417
- gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain #121672
- [3.13] gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain (GH-121672) #121810