You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_pyrepl: test_not_wiping_history_file() fails (randomly?) on multiple buildbots #121351
I've been seeing test_pyrepl errors for a week or so now. I see the above and a failure in test_exposed_globals_in_repl on M1 Mac and my old Dell running Ubuntu. Happy to provide more details if needed, but it sounds like this is a fairly widespread problem.
Mac output:
Re-running test_pyrepl in verbose mode (matching: test_exposed_globals_in_repl, test_not_wiping_history_file)
test_exposed_globals_in_repl (test.test_pyrepl.test_pyrepl.TestMain.test_exposed_globals_in_repl) ... FAIL
test_not_wiping_history_file (test.test_pyrepl.test_pyrepl.TestMain.test_not_wiping_history_file) ... FAIL
======================================================================
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())
io.FileIO name='/var/folders/d6/rzq9g7qd7zn5pwbc3pj1sthc0000gn/T/test_python_tk38j3o9/tmp8nzxvwmu' mode='rb+' closefd=True>
gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
test test_pyrepl failed
1 test failed again:
test_pyrepl
Dell (Ubuntu) output:
Re-running test_pyrepl in verbose mode (matching: test_exposed_globals_in_repl, test_not_wiping_history_file)
test_exposed_globals_in_repl (test.test_pyrepl.test_pyrepl.TestMain.test_exposed_globals_in_repl) ... FAIL
test_not_wiping_history_file (test.test_pyrepl.test_pyrepl.TestMain.test_not_wiping_history_file) ... FAIL
======================================================================
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:94f50f8ee68, Jul 3 2024, 16:43:33) [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
======================================================================
FAIL: test_not_wiping_history_file (test.test_pyrepl.test_pyrepl.TestMain.test_not_wiping_history_file)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/skip/src/python/cpython/Lib/test/test_pyrepl/test_pyrepl.py", line 913, in test_not_wiping_history_file
self.assertEqual(exit_code, 0)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
AssertionError: 1 != 0
----------------------------------------------------------------------
Ran 2 tests in 1.149s
FAILED (failures=2)
/home/skip/src/python/cpython/Lib/test/support/__init__.py:813: ResourceWarning: unclosed file <_io.FileIO name='/tmp/test_python_arl58hui/tmpp21h4toz' mode='rb+' closefd=True>
gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
test test_pyrepl failed
1 test failed again:
test_pyrepl
I see the above and a failure in test_exposed_globals_in_repl on M1 Mac and my old Dell running Ubuntu. Happy to provide more details if needed, but it sounds like this is a fairly widespread problem.
Please open a separated issue for test_exposed_globals_in_repl(). See also #121206.
I know it's closed, but this test still fails for me on my Mac (main and 3.13). I'm out of town, so can't check on my Ubuntu system, but I seem to recall that Apple's libedit maybe isn't a faithful replacement for all readline features:
% otool -L Modules/readline.cpython-314-darwin.so
Modules/readline.cpython-314-darwin.so:
/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
Is it possible that simply skipping the test based on the presence of the readline module isn't discriminating enough?
Edit @vstinner in case comments on closed issues don't send out notifications.
Activity
smontanaro commentedon Jul 3, 2024
I've been seeing
test_pyreplerrors for a week or so now. I see the above and a failure intest_exposed_globals_in_replon M1 Mac and my old Dell running Ubuntu. Happy to provide more details if needed, but it sounds like this is a fairly widespread problem.Mac output:
Dell (Ubuntu) output:
vstinner commentedon Jul 4, 2024
Please open a separated issue for test_exposed_globals_in_repl(). See also #121206.
smontanaro commentedon Jul 4, 2024
Yes, I saw that before. I opened a new issue:
#121359
skirpichev commentedon Jul 6, 2024
That means, that #121245 is not fixed on some systems.
Edit:
@vstinner, is there examples of such failures AND successes on same buildbot?
I'm working on this.
skirpichev commentedon Jul 6, 2024
In this example: "checking for stdlib extension module readline... missing". Unless I miss something, it's valid for other cases too, e.g.:
https://buildbot.python.org/all/#/builders/1481/builds/288
As a workaround, I suggest to disable test if readline module is missing.
pythongh-121351: skip test_not_wiping_history_file() if no readline
skirpichev commentedon Jul 6, 2024
FYI, pr is ready: #121422
gh-121351: Skip test_not_wiping_history_file() if no readline (#121422)
pythongh-121351: Skip test_not_wiping_history_file() if no readline (p…
vstinner commentedon Jul 6, 2024
Fixed by change 68e279b.
[3.13] gh-121351: Skip test_not_wiping_history_file() if no readline (G…
smontanaro commentedon Jul 10, 2024
I know it's closed, but this test still fails for me on my Mac (main and 3.13). I'm out of town, so can't check on my Ubuntu system, but I seem to recall that Apple's
libeditmaybe isn't a faithful replacement for allreadlinefeatures:Is it possible that simply skipping the test based on the presence of the
readlinemodule isn't discriminating enough?Edit @vstinner in case comments on closed issues don't send out notifications.
skirpichev commentedon Jul 10, 2024
#121245 was reopened.
Edit: @smontanaro, could you reproduce that original issue on your Mac?
pythongh-121351: Skip test_not_wiping_history_file() if no readline (p…
pythongh-121351: Skip test_not_wiping_history_file() if no readline (p…